Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80; ## listen for ipv4; this line is default and implied
- #listen [::]:80 default_server ipv6only=on; ## listen for ipv6
- root /var/www/cloud.example.com/webroot;
- index index.php index.html index.htm;
- server_name cloud.example.com www.cloud.example.com;
- access_log /var/log/nginx/cloud.example.com-access.log;
- error_log /var/log/nginx/cloud.example.com-error.log;
- # set max upload size
- client_max_body_size 21G;
- fastcgi_buffers 64 4K;
- # Disable gzip to avoid the removal of the ETag header
- gzip off;
- rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
- rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
- rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
- error_page 403 /core/templates/403.php;
- error_page 404 /core/templates/404.php;
- add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
- add_header X-Content-Type-Options nosniff;
- add_header X-Frame-Options "SAMEORIGIN";
- add_header X-XSS-Protection "1; mode=block";
- add_header X-Robots-Tag none;
- location / {
- # The following 2 rules are only needed with webfinger
- rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
- rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
- rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
- rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
- rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
- # First attempt to serve request as file, then
- # as directory, then fall back to displaying a 404.
- try_files $uri $uri/ /index.php;
- # Uncomment to enable naxsi on this location
- # include /etc/nginx/naxsi.rules
- }
- location ~ ^(.+?\.php)(/.*)?$ {
- fastcgi_pass unix:/var/run/php5-fpm-cloud.example.com.sock;
- fastcgi_index index.php;
- include fastcgi_params;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param HTTP_AUTHORIZATION $http_authorization;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- fastcgi_param modHeadersAvailable true;
- fastcgi_read_timeout 300;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
- deny all;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment