Changes

From SME Server
Jump to navigationJump to search
1,769 bytes added ,  13:12, 24 February 2020
Line 23: Line 23:  
=== Version ===
 
=== Version ===
 
<!-- keep this first element as is, you can add some if needed -->
 
<!-- keep this first element as is, you can add some if needed -->
{{#smeversion: {{#var:smecontribname}} }}
+
{{#smeversion: smeserver-php-fpm }}
{{#smeversion: {{#var:contribname}} }}
+
 
    
=== Description ===
 
=== Description ===
Line 40: Line 40:  
signal-event webapps-update
 
signal-event webapps-update
 
service php-fpm start
 
service php-fpm start
service php-56 start
+
service php56-php-fpm start
service php-70 start
+
service php70-php-fpm start
service php-71 start
+
service php71-php-fpm start
service php-72 start
+
service php72-php-fpm start
service php-73 start
+
service php73-php-fpm start
    
</syntaxhighlight>
 
</syntaxhighlight>
Line 262: Line 262:  
     $php =<<'_EOF';
 
     $php =<<'_EOF';
 
     <FilesMatch \.php$>
 
     <FilesMatch \.php$>
         SetHannextclouder "proxy:unix:/var/run/php-fpm/php71-nextcloud.sock|fcgi://localhost"
+
         SetHandler "proxy:unix:/var/run/php-fpm/php71-nextcloud.sock|fcgi://localhost"
 
     </FilesMatch>
 
     </FilesMatch>
 
_EOF
 
_EOF
 
   }
 
   }
 +
 +
my $config =<<_EOF;
 +
  <Directory "/usr/share/nextcloud">
 +
    Options +FollowSymLinks
 +
    AllowOverride All
 +
$php
 +
    order deny,allow
 +
    deny from all
 +
    allow from $allow
 +
$auth
 +
 +
    <IfModule mod_dav.c>
 +
      Dav off
 +
    </IfModule>
 +
 +
    SetEnv HOME /usr/share/nextcloud
 +
    SetEnv HTTP_HOME /usr/share/nextcloud
 +
    SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=\$1
 +
  </Directory>
 +
 +
  <Directory "/home/e-smith/files/nextcloud/data/">
 +
    # just in case if .htaccess gets disabled
 +
    deny from all
 +
  </Directory>
 +
_EOF
 +
 +
 +
$OUT .=<<"END"
 +
# nextcloud Configuration
 +
<IfModule mod_headers.c>
 +
  Header always set Strict-Transport-Security "max-age=15552000"
 +
</IfModule>
 +
$alias
 +
 +
$config
 +
 +
Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav
 +
Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav
 +
 +
 +
END
 +
}
 +
else{
 +
    $OUT .= "# nextcloud is disabled\n";
 +
}
 +
}
    
</syntaxhighlight>Of course you will need to process both httpd.conf, php-fpm specific version and restart both httpd-e-smith and the php-fpm version you use.
 
</syntaxhighlight>Of course you will need to process both httpd.conf, php-fpm specific version and restart both httpd-e-smith and the php-fpm version you use.
    
You will also need specific code to create the destination directories for php usage : see /etc/e-smith/events/actions/php-pool-dirs from this contrib
 
You will also need specific code to create the destination directories for php usage : see /etc/e-smith/events/actions/php-pool-dirs from this contrib
 +
 +
{{Warning box|On initial installation, smeserver-php-fpm does not start php pools and signal-event webapps-update does only a reload which will not start stopped services.
 +
So pay attention you need to start if not already started on initial install.}}
    
=== Create and use my own pool ===
 
=== Create and use my own pool ===
Line 321: Line 370:  
|
 
|
 
|-
 
|-
|DisableFunctions
+
|DisabledFunctions
|system,show_source, symlink,exec,dl,shell_exec,passthru,phpinfo,escapeshellarg,escapeshellcmd
+
|system,show_source,symlink,exec,dl,shell_exec,passthru,phpinfo,escapeshellarg,escapeshellcmd
 
|
 
|
 
|-
 
|-
Line 341: Line 390:  
|
 
|
 
|}
 
|}
you will then need a httpd.conf template fragment to use your pool.
+
you will then need two httpd.conf custom template fragment to use your pool. You will need to change  '''MYPOOL''' to what you want<syntaxhighlight lang="bash">
 +
mkdir -p  /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
 +
vim /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/98mypoolusage
 +
</syntaxhighlight><syntaxhighlight lang="perl">
 +
<Directory /home/e-smith/files/ibays/test/html>
 +
    SSLRequireSSL
 +
    Options None
 +
    Options +Indexes
 +
    Options +FollowSymLinks
 +
    DirectoryIndex index.php index.shtml index.htm index.html
 +
    AddHandler phpMYPOOL-fastcgi .php
 +
    AllowOverride All
 +
    order deny,allow
 +
    deny from all
 +
    allow from all
 +
</Directory>
 +
 
 +
</syntaxhighlight>then just do signal-event webapps-update
    
=== Uninstall ===
 
=== Uninstall ===
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,240

edits

Navigation menu