Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #user 'domain' virtual host 'domain.ru' configuration file
- server {
- server_name www.domain.ru;
- charset off;
- disable_symlinks if_not_owner from=$root_path;
- index index.html index.php;
- root $root_path;
- set $root_path /var/www/domain/data/www/domain.ru;
- access_log /var/www/httpd-logs/domain.ru.access.log ;
- error_log /var/www/httpd-logs/domain.ru.error.log notice;
- include /etc/nginx/vhosts-includes/*.conf;
- include /etc/nginx/vhosts-resources/domain.ru/*.conf;
- location / {
- #limit_conn addr 3;
- location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
- try_files $uri $uri/ @fallback;
- expires 30m;
- }
- location / {
- try_files /does_not_exists @fallback;
- }
- location ~ [^/]\.ph(p\d*|tml)$ {
- try_files /does_not_exists @fallback;
- }
- }
- location @fallback {
- proxy_pass http://127.0.0.1:8080;
- proxy_redirect http://127.0.0.1:8080 /;
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- access_log off ;
- }
- ssi on;
- listen 185.60.135.210:80;
- return 301 https://domain.ru:443$request_uri;
- }
- server {
- server_name domain.ru www.domain.ru;
- charset off;
- disable_symlinks if_not_owner from=$root_path;
- index index.html index.php;
- root $root_path;
- set $root_path /var/www/domain/data/www/domain.ru;
- access_log /var/www/httpd-logs/domain.ru.access.log ;
- error_log /var/www/httpd-logs/domain.ru.error.log notice;
- include /etc/nginx/vhosts-includes/*.conf;
- include /etc/nginx/vhosts-resources/domain.ru/*.conf;
- location / {
- #limit_conn addr 3;
- location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
- try_files $uri $uri/ @fallback;
- expires 30m;
- }
- location / {
- try_files /does_not_exists @fallback;
- }
- location ~ [^/]\.ph(p\d*|tml)$ {
- try_files /does_not_exists @fallback;
- }
- }
- location @fallback {
- proxy_pass http://127.0.0.1:8080;
- proxy_redirect http://127.0.0.1:8080 /;
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- access_log off ;
- }
- ssi on;
- rewrite ^(/uploads/.*)$ $1 break;
- listen 185.60.135.210:80;
- return 301 https://$host:443$request_uri;
- }
- server {
- server_name www.domain.ru;
- charset off;
- disable_symlinks if_not_owner from=$root_path;
- index index.html index.php;
- root $root_path;
- set $root_path /var/www/domain/data/www/domain.ru;
- access_log /var/www/httpd-logs/domain.ru.access.log ;
- error_log /var/www/httpd-logs/domain.ru.error.log notice;
- include /etc/nginx/vhosts-includes/*.conf;
- include /etc/nginx/vhosts-resources/domain.ru/*.conf;
- location / {
- #limit_conn addr 3;
- location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
- try_files $uri $uri/ @fallback;
- expires 30m;
- }
- location / {
- try_files /does_not_exists @fallback;
- }
- location ~ [^/]\.ph(p\d*|tml)$ {
- try_files /does_not_exists @fallback;
- }
- }
- location @fallback {
- proxy_pass http://127.0.0.1:8080;
- proxy_redirect http://127.0.0.1:8080 /;
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- access_log off ;
- }
- ssi on;
- add_header Strict-Transport-Security "max-age=31536000;";
- listen 185.60.135.210:443;
- ssl on;
- ssl_certificate "/var/www/httpd-cert/domain/domain.ru.crtca";
- ssl_certificate_key "/var/www/httpd-cert/domain/domain.ru.key";
- ssl_ciphers ****************************;
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- ssl_prefer_server_ciphers on;
- ssl_ecdh_curve secp384r1; # Requires nginx >= 1.1.0
- ssl_session_cache shared:SSL:10m;
- ssl_session_tickets off; # Requires nginx >= 1.5.9
- ssl_stapling on; # Requires nginx >= 1.3.7
- ssl_stapling_verify on; # Requires nginx => 1.3.7
- add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
- add_header X-Frame-Options DENY;
- add_header X-Content-Type-Options nosniff;
- return 301 https://domain.ru$request_uri ;
- }
- server {
- server_name domain.ru www.domain.ru;
- charset off;
- disable_symlinks if_not_owner from=$root_path;
- index index.html index.php;
- root $root_path;
- set $root_path /var/www/domain/data/www/domain.ru;
- access_log /var/www/httpd-logs/domain.ru.access.log ;
- error_log /var/www/httpd-logs/domain.ru.error.log notice;
- include /etc/nginx/vhosts-includes/*.conf;
- include /etc/nginx/vhosts-resources/domain.ru/*.conf;
- location / {
- #limit_conn addr 3;
- location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
- try_files $uri $uri/ @fallback;
- expires 30m;
- }
- location / {
- try_files /does_not_exists @fallback;
- }
- location ~ [^/]\.ph(p\d*|tml)$ {
- try_files /does_not_exists @fallback;
- }
- }
- location @fallback {
- proxy_pass http://127.0.0.1:8080;
- proxy_redirect http://127.0.0.1:8080 /;
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- access_log off ;
- }
- ssi on;
- rewrite ^(/uploads/.*)$ $1 break;
- add_header Strict-Transport-Security "max-age=31536000;";
- listen 185.60.135.210:443;
- ssl on;
- ssl_certificate "/var/www/httpd-cert/domain/domain.ru.crtca";
- ssl_certificate_key "/var/www/httpd-cert/domain/domain.ru.key";
- ssl_ciphers ****************************;
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- ssl_prefer_server_ciphers on;
- ssl_ecdh_curve secp384r1; # Requires nginx >= 1.1.0
- ssl_session_cache shared:SSL:10m;
- ssl_session_tickets off; # Requires nginx >= 1.5.9
- ssl_stapling on; # Requires nginx >= 1.3.7
- ssl_stapling_verify on; # Requires nginx => 1.3.7
- add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
- add_header X-Frame-Options DENY;
- add_header X-Content-Type-Options nosniff;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement