mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-03 02:09:45 +07:00
Update admin_manual/installation_webservernotes.rst
Improve nginx example
This commit is contained in:
@@ -23,7 +23,7 @@ Nginx Configuration
|
||||
server {
|
||||
listen 80;
|
||||
server_name owncloud.example.org;
|
||||
rewrite ^ https://$server_name$request_uri? permanent; # enforce https
|
||||
return 301 https://$server_name$request_uri; # enforce https
|
||||
}
|
||||
|
||||
# owncloud (ssl/tls)
|
||||
@@ -37,7 +37,7 @@ Nginx Configuration
|
||||
client_max_body_size 1000M; # set maximum upload size
|
||||
|
||||
# deny direct access
|
||||
location ^ ^/(data|config|\.ht|db_structure\.xml|README) {
|
||||
location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,8 @@ Nginx Configuration
|
||||
}
|
||||
|
||||
# enable php
|
||||
location ^ \.php$ {
|
||||
location ~ \.php$ {
|
||||
try_files $uri = 404
|
||||
fastcgi_pass 127.0.0.1:9000; # or use php-fpm with: "unix:/var/run/php-fpm/php-fpm.sock;"
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param HTTPS on;
|
||||
|
||||
Reference in New Issue
Block a user