Nextcloud-Docker/.examples/docker-compose/with-nginx-proxy/postgres/fpm/web/nginx.conf

174 lines
6.6 KiB
Nginx Configuration File
Raw Permalink Normal View History

worker_processes auto;
2017-08-25 15:18:25 +00:00
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
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;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
set_real_ip_from 10.0.0.0/8;
set_real_ip_from 172.16.0.0/12;
set_real_ip_from 192.168.0.0/16;
real_ip_header X-Real-IP;
2017-08-25 15:18:25 +00:00
#gzip on;
upstream php-handler {
server app:9000;
}
server {
listen 80;
# Add headers to serve security related headers
# Before enabling Strict-Transport-Security headers please read into this
# topic first.
examples: docker-compose: Update nginx configs (#912) * examples: docker-compose: insecure: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy-self-signed-ssl: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de>
2019-11-07 19:30:48 +00:00
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
2017-08-25 15:18:25 +00:00
#
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
examples: docker-compose: Update nginx configs (#912) * examples: docker-compose: insecure: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy-self-signed-ssl: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de>
2019-11-07 19:30:48 +00:00
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Download-Options "noopen" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "none" always;
add_header X-XSS-Protection "1; mode=block" always;
# Remove X-Powered-By, which is an information leak
fastcgi_hide_header X-Powered-By;
# Path to the root of your installation
2017-08-25 15:18:25 +00:00
root /var/www/html;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# The following 2 rules are only needed for the user_webfinger app.
# Uncomment it if you're planning to use this app.
#rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
examples: docker-compose: Update nginx configs (#912) * examples: docker-compose: insecure: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy-self-signed-ssl: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de>
2019-11-07 19:30:48 +00:00
#rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
# The following rule is only needed for the Social app.
# Uncomment it if you're planning to use this app.
#rewrite ^/.well-known/webfinger /public.php?service=webfinger last;
2017-08-25 15:18:25 +00:00
location = /.well-known/carddav {
examples: docker-compose: Update nginx configs (#912) * examples: docker-compose: insecure: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy-self-signed-ssl: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de>
2019-11-07 19:30:48 +00:00
return 301 $scheme://$host:$server_port/remote.php/dav;
2017-08-25 15:18:25 +00:00
}
examples: docker-compose: Update nginx configs (#912) * examples: docker-compose: insecure: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy-self-signed-ssl: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de>
2019-11-07 19:30:48 +00:00
2017-08-25 15:18:25 +00:00
location = /.well-known/caldav {
examples: docker-compose: Update nginx configs (#912) * examples: docker-compose: insecure: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy-self-signed-ssl: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de>
2019-11-07 19:30:48 +00:00
return 301 $scheme://$host:$server_port/remote.php/dav;
2017-08-25 15:18:25 +00:00
}
# set max upload size
2017-09-30 11:14:13 +00:00
client_max_body_size 10G;
2017-08-25 15:18:25 +00:00
fastcgi_buffers 64 4K;
# Enable gzip but do not remove ETag headers
gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
# Uncomment if your server is build with the ngx_pagespeed module
# This module is currently not supported.
#pagespeed off;
location / {
examples: docker-compose: Update nginx configs (#912) * examples: docker-compose: insecure: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy-self-signed-ssl: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de>
2019-11-07 19:30:48 +00:00
rewrite ^ /index.php;
2017-08-25 15:18:25 +00:00
}
examples: docker-compose: Update nginx configs (#912) * examples: docker-compose: insecure: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy-self-signed-ssl: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de>
2019-11-07 19:30:48 +00:00
location ~ ^\/(?:build|tests|config|lib|3rdparty|templates|data)\/ {
2017-08-25 15:18:25 +00:00
deny all;
}
examples: docker-compose: Update nginx configs (#912) * examples: docker-compose: insecure: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy-self-signed-ssl: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de>
2019-11-07 19:30:48 +00:00
location ~ ^\/(?:\.|autotest|occ|issue|indie|db_|console) {
2017-08-25 15:18:25 +00:00
deny all;
}
examples: docker-compose: Update nginx configs (#912) * examples: docker-compose: insecure: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy-self-signed-ssl: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de>
2019-11-07 19:30:48 +00:00
location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) {
fastcgi_split_path_info ^(.+?\.php)(\/.*|)$;
set $path_info $fastcgi_path_info;
try_files $fastcgi_script_name =404;
2017-08-25 15:18:25 +00:00
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
examples: docker-compose: Update nginx configs (#912) * examples: docker-compose: insecure: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy-self-signed-ssl: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de>
2019-11-07 19:30:48 +00:00
fastcgi_param PATH_INFO $path_info;
2017-08-25 15:18:25 +00:00
# fastcgi_param HTTPS on;
examples: docker-compose: Update nginx configs (#912) * examples: docker-compose: insecure: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy-self-signed-ssl: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de>
2019-11-07 19:30:48 +00:00
# Avoid sending the security headers twice
2017-08-25 15:18:25 +00:00
fastcgi_param modHeadersAvailable true;
examples: docker-compose: Update nginx configs (#912) * examples: docker-compose: insecure: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy-self-signed-ssl: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de>
2019-11-07 19:30:48 +00:00
# Enable pretty urls
2017-08-25 15:18:25 +00:00
fastcgi_param front_controller_active true;
fastcgi_pass php-handler;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
}
examples: docker-compose: Update nginx configs (#912) * examples: docker-compose: insecure: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy-self-signed-ssl: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de>
2019-11-07 19:30:48 +00:00
location ~ ^\/(?:updater|oc[ms]-provider)(?:$|\/) {
2017-08-25 15:18:25 +00:00
try_files $uri/ =404;
index index.php;
}
examples: docker-compose: Update nginx configs (#912) * examples: docker-compose: insecure: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy-self-signed-ssl: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de>
2019-11-07 19:30:48 +00:00
# Adding the cache control header for js, css and map files
2017-08-25 15:18:25 +00:00
# Make sure it is BELOW the PHP block
examples: docker-compose: Update nginx configs (#912) * examples: docker-compose: insecure: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy-self-signed-ssl: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de>
2019-11-07 19:30:48 +00:00
location ~ \.(?:css|js|woff2?|svg|gif|map)$ {
try_files $uri /index.php$request_uri;
2017-08-25 15:18:25 +00:00
add_header Cache-Control "public, max-age=15778463";
# Add headers to serve security related headers (It is intended to
# have those duplicated to the ones above)
# Before enabling Strict-Transport-Security headers please read into
# this topic first.
examples: docker-compose: Update nginx configs (#912) * examples: docker-compose: insecure: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy-self-signed-ssl: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de>
2019-11-07 19:30:48 +00:00
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
2017-08-25 15:18:25 +00:00
#
# WARNING: Only add the preload option once you read about
# the consequences in https://hstspreload.org/. This option
# will add the domain to a hardcoded list that is shipped
# in all major browsers and getting removed from this list
# could take several months.
examples: docker-compose: Update nginx configs (#912) * examples: docker-compose: insecure: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy-self-signed-ssl: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de>
2019-11-07 19:30:48 +00:00
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Download-Options "noopen" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "none" always;
add_header X-XSS-Protection "1; mode=block" always;
2017-08-25 15:18:25 +00:00
# Optional: Don't log access to assets
access_log off;
}
examples: docker-compose: Update nginx configs (#912) * examples: docker-compose: insecure: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: insecure: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: mariadb-cron-redis: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy: postgres: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de> * examples: docker-compose: with-nginx-proxy-self-signed-ssl: mariadb: Update nginx.conf This commit applies the latest nginx configuration from the official documentation. Therefore it also helps to fix CVE-2019-11043. References: - https://nextcloud.com/blog/urgent-security-issue-in-nginx-php-fpm - https://docs.nextcloud.com/server/17/admin_manual/installation/nginx.html Signed-off-by: Alexander Schroth <alexander.schroth@fau.de>
2019-11-07 19:30:48 +00:00
location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ {
try_files $uri /index.php$request_uri;
2017-08-25 15:18:25 +00:00
# Optional: Don't log access to other assets
access_log off;
}
}
}