Changes

From SME Server
Jump to navigationJump to search
1,870 bytes added ,  19:26, 27 January 2020
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.
Line 341: Line 387:  
|
 
|
 
|}
 
|}
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 '''VERSION''' and '''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/68FastCGIConfig15myphppool
 +
</syntaxhighlight><syntaxhighlight>
 +
Action phpMYPOOL-fastcgi /php-cgi-bin/phpMYPOOL-wrapper
 +
Alias /php-cgi-bin/phpMYPOOL-wrapper /var/www/php-cgi-bin/phpMYPOOL-wrapper
 +
FastCgiExternalServer /var/www/php-cgi-bin/phpMYPOOL-wrapper -socket /var/run/php-fpm/phpVERSION-MYPOOL.sock -pass-header Authorization -idle-timeout 120
 +
</syntaxhighlight><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/ibays/Primary/html/myfolder">
 +
    Options +FollowSymLinks
 +
    AllowOverride All
 +
    AddHandler phpnextcloud-fastcgi .php\n";
 +
  </Directory>
 +
 
 +
 
 +
</syntaxhighlight>
    
=== Uninstall ===
 
=== Uninstall ===
Super Admin, Wiki & Docs Team, Bureaucrats, Interface administrators, Administrators
3,240

edits

Navigation menu