server {
listen *******:443 ssl http2;
server_name ***** *****;
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
root /root/site/web/domain/public_html;
index index.php index.html index.htm;
access_log /var/log/nginx/domains/domain.log combined;
access_log /var/log/nginx/domains/domain.bytes bytes;
error_log /var/log/nginx/domains/domain.error.log error;
client_max_body_size 6G;
gzip on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types text/plain text/css application/json \application/x-javascript text/xml application/xml \application/xml+rss text/javascript application/javascript \text/x-js;
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
ssl on;
ssl_certificate ssl-bundle.crt;
ssl_certificate_key ssl.****.key;
# nginx webdav rules
# allow for paths ending with forward slashes
rewrite ^/app/(.*)/ /plugins/webdav/site/control/$1 last;
rewrite ^/app/(.*) /plugins/webdav/site/control/$1 last;
# all webdav requests
location /plugins/webdav/site/control/ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
gzip off;
fastcgi_pass 127.0.0.1:9001;
fastcgi_index index.php;
include fastcgi_params;
add_header Cache-Control public;
fastcgi_hide_header Set-Cookie;
}
location ~* ^.+\.(png|svg|js|css|mp3|ogg|mpeg|avi|zip|gz|bz2?|rar|swf|woff)$ { expires 7d; }
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
if (!-e $request_filename) { rewrite ^/(.*) /index.php?_page_url=$1 last; }
fastcgi_pass 127.0.0.1:9001;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location / {
if (!-e $request_filename) {
rewrite ^/(.*) /index.php?_page_url=$1 last;
}
}
location /files/ {
internal;
}
include /etc/nginx/conf.d/p*;
include /etc/nginx/conf.d/p*;
include /etc/nginx/conf.d/w*;
include /root/name/conf/web/nginx.domain.conf*;
}