Tried some changes, still no fix

This commit is contained in:
WilliamMiceli
2019-01-07 16:59:01 -05:00
parent 87e9857509
commit 5ffda99de2

View File

@@ -1,21 +1,28 @@
user www-data; user www-data;
worker_processes 4; ## Default: 1 worker_processes 1;
# worker_rlimit_nofile 8192; # worker_rlimit_nofile 8192;
#error_log /var/log/nginx/error.log warn; #error_log /var/log/nginx/error.log warn;
#pid /var/run/nginx.pid; pid /var/run/nginx.pid;
events { events {
worker_connections 1024; ## Default: 1024 worker_connections 1024;
} }
http { http {
include /etc/nginx/mime.types; include /etc/nginx/mime.types;
default_type application/octet-stream; default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log /var/log/nginx/access.log main; #access_log /var/log/nginx/access.log main;
sendfile on; sendfile on;
tcp_nopush on; #tcp_nopush on;
#keepalive_timeout 65;
keepalive_timeout 65;
upstream php-handler { upstream php-handler {
server nextcloud:9000; server nextcloud:9000;
@@ -24,7 +31,6 @@ http {
server { server {
listen 80; listen 80;
listen [::]:80; listen [::]:80;
server_name _;
# Add headers to serve security related headers # Add headers to serve security related headers
add_header X-Content-Type-Options nosniff; add_header X-Content-Type-Options nosniff;
@@ -59,7 +65,7 @@ http {
} }
# set max upload size # set max upload size
client_max_body_size 1G; client_max_body_size 10G;
fastcgi_buffers 64 4K; fastcgi_buffers 64 4K;
# Enable gzip but do not remove ETag headers # Enable gzip but do not remove ETag headers
@@ -83,10 +89,10 @@ http {
} }
location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\.php(?:$|/) { location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\.php(?:$|/) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_split_path_info ^(.+\.php)(/.*)$;
# Mitigate https://httpoxy.org/ vulnerabilities: # Mitigate https://httpoxy.org/ vulnerabilities:
fastcgi_param HTTP_PROXY ""; fastcgi_param HTTP_PROXY "";
fastcgi_index index.php; #fastcgi_index index.php;
include fastcgi_params; include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_INFO $fastcgi_path_info;
@@ -105,7 +111,7 @@ http {
# Adding the cache control header for js and css files # Adding the cache control header for js and css files
# Make sure it is BELOW the PHP block # Make sure it is BELOW the PHP block
location ~ \.(?:css|js|woff2?|svg|gif)$ { location ~ \.(?:css|js|woff|svg|gif)$ {
try_files $uri /index.php$request_uri; try_files $uri /index.php$request_uri;
add_header Cache-Control "public, max-age=15778463"; add_header Cache-Control "public, max-age=15778463";
add_header X-Content-Type-Options nosniff; add_header X-Content-Type-Options nosniff;
@@ -129,7 +135,6 @@ http {
server { server {
listen 81; listen 81;
listen [::]:81; listen [::]:81;
server_name _;
# static files # static files
location ^~ /loleaflet { location ^~ /loleaflet {