bunkerweb/examples/nextcloud/server-confs/nextcloud.conf

33 lines
1,010 B
Text
Raw Normal View History

2020-11-22 16:38:07 +00:00
location ~ \.php(?:$|/) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
set $path_info $fastcgi_path_info;
2020-10-25 17:30:34 +00:00
2020-11-22 16:38:07 +00:00
try_files $fastcgi_script_name =404;
2020-10-25 17:30:34 +00:00
2020-11-22 16:38:07 +00:00
include fastcgi.conf;
fastcgi_param SCRIPT_FILENAME /var/www/html/$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
fastcgi_param HTTPS on;
2020-10-25 17:30:34 +00:00
2020-11-22 16:38:07 +00:00
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
fastcgi_param front_controller_active true; # Enable pretty urls
fastcgi_pass mync:9000;
2020-10-25 17:30:34 +00:00
2020-11-22 16:38:07 +00:00
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
2020-10-25 17:30:34 +00:00
}
2020-11-22 16:38:07 +00:00
location ~ \.(?:css|js|svg|gif)$ {
try_files $uri /index.php$request_uri;
expires 6M; # Cache-Control policy borrowed from `.htaccess`
2020-10-25 17:30:34 +00:00
}
2020-11-22 16:38:07 +00:00
location ~ \.woff2?$ {
try_files $uri /index.php$request_uri;
expires 7d; # Cache-Control policy borrowed from `.htaccess`
2020-10-25 17:30:34 +00:00
}
2020-11-22 16:38:07 +00:00
location / {
try_files $uri /index.php$request_uri;
}