123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- server {
- listen 80;
- server_name DOMAIN.LTD;
- return 301 https://$server_name$request_uri;
- }
- server {
- listen 443 ssl;
- listen [::]:443 ssl;
- server_name DOMAIN.LTD;
- root /var/www/DOMAIN.LTD/public_html;
-
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- ssl_certificate "/etc/letsencrypt/live/DOMAIN.LTD/fullchain.pem";
- ssl_certificate_key "/etc/letsencrypt/live/DOMAIN.LTD/privkey.pem";
- ssl_dhparam /etc/nginx/ssl/certs/DOMAIN.LTD/dhparam.pem;
- ssl_session_cache shared:SSL:1m;
- ssl_session_timeout 10m;
- ssl_ciphers HIGH:!aNULL:!MD5;
-
- ssl_prefer_server_ciphers on;
- add_header Strict-Transport-Security "max-age=31536000;
- #includeSubDomains" always;
- charset utf-8;
- location = /favicon.ico {
- access_log off;
- log_not_found off;
- }
- location = /robots.txt {
- allow all;
- access_log off;
- log_not_found off;
- }
- location ~ \..*/.*\.php$ {
- return 403;
- }
- location ~ ^/sites/.*/private/ {
- return 403;
- }
-
- location ~ ^/sites/[^/]+/files/.*\.php$ {
- deny all;
- }
-
- location ~* ^/.well-known/ {
- allow all;
- }
-
-
-
- location ~ (^|/)\. {
- return 403;
- }
- location / {
-
- try_files $uri /index.php?$query_string;
- }
- location @rewrite {
- rewrite ^/(.*)$ /index.php?q=$1;
- }
-
- location ~ /vendor/.*\.php$ {
- deny all;
- return 404;
- }
- location ~ /\.ht {
- deny all;
- }
- access_log on;
- error_log /var/www/DOMAIN.LTD/log/error.log;
- sendfile off;
- client_max_body_size 100m;
-
-
-
-
-
-
-
-
-
-
-
- location ~ '\.php$|^/update.php' {
-
- fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
- include fastcgi_params;
-
- fastcgi_param HTTP_PROXY "";
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- fastcgi_param QUERY_STRING $query_string;
- fastcgi_intercept_errors on;
-
-
- fastcgi_pass unix:/run/php/php7.0-fpm.sock;
- }
-
-
- location ~ ^/sites/.*/files/styles/ {
- try_files $uri @rewrite;
- }
-
-
- location ~ ^(/[a-z\-]+)?/system/files/ {
- try_files $uri /index.php?$query_string;
- }
- location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
- try_files $uri @rewrite;
- expires max;
- log_not_found off;
- }
-
- add_header X-Frame-Options SAMEORIGIN;
- }
|