Advertisement
Guest User

vhost

a guest
Jun 2nd, 2017
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 2.57 KB | None | 0 0
  1. server {
  2.     server_name new-parket.ru www.new-parket.ru;
  3.     charset off;
  4.     index index.html index.php;
  5.     disable_symlinks if_not_owner from=$root_path;
  6.     include /etc/nginx/vhosts-includes/*.conf;
  7.     include /etc/nginx/vhosts-resources/new-parket.ru/*.conf;
  8.     access_log /var/www/httpd-logs/new-parket.ru.access.log;
  9.     error_log /var/www/httpd-logs/new-parket.ru.error.log notice;
  10.     ssi on;
  11.     set $root_path /var/www/parket-sites/data/www/new-parket.ru;
  12.     root $root_path;
  13.     location / {
  14.         location ~ [^/]\.ph(p\d*|tml)$ {
  15.             try_files /does_not_exists @fallback;
  16.         }
  17.         location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
  18.             try_files $uri $uri/ @fallback;
  19.         }
  20.         location / {
  21.             try_files /does_not_exists @fallback;
  22.         }
  23.     }
  24.     location @fallback {
  25.         proxy_pass http://127.0.0.1:8080;
  26.         proxy_redirect http://127.0.0.1:8080 /;
  27.         proxy_set_header Host $host;
  28.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  29.         proxy_set_header X-Forwarded-Proto $scheme;
  30.         access_log on;
  31.         access_log off;
  32.     }
  33.     listen 144.76.116.110:80;
  34.     listen [2a01:4f8:192:716d::2]:80;
  35.    
  36.     return 301 https://$host$request_uri;
  37. }
  38. server {
  39.     server_name new-parket.ru www.new-parket.ru;
  40.     ssl on;
  41.     ssl_certificate "/var/www/httpd-cert/parket-sites/new-parket.ru-2017.crtca";
  42.     ssl_certificate_key "/var/www/httpd-cert/parket-sites/new-parket.ru-2017.key";
  43.     ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
  44.     ssl_prefer_server_ciphers on;
  45.     ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  46.     add_header Strict-Transport-Security "max-age=31536000;";
  47.     charset off;
  48.     index index.html index.php;
  49.     disable_symlinks if_not_owner from=$root_path;
  50.     include /etc/nginx/vhosts-includes/*.conf;
  51.     include /etc/nginx/vhosts-resources/new-parket.ru/*.conf;
  52.     access_log /var/www/httpd-logs/new-parket.ru.access.log;
  53.     error_log /var/www/httpd-logs/new-parket.ru.error.log notice;
  54.     ssi on;
  55.     set $root_path /var/www/parket-sites/data/www/new-parket.ru;
  56.     root $root_path;
  57.     listen 144.76.116.110:443;
  58.     listen [2a01:4f8:192:716d::2]:443;
  59.     location / {
  60.         location ~ [^/]\.ph(p\d*|tml)$ {
  61.             try_files /does_not_exists @fallback;
  62.         }
  63.         location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
  64.             try_files $uri $uri/ @fallback;
  65.         }
  66.         location / {
  67.             try_files /does_not_exists @fallback;
  68.         }
  69.     }
  70.     location @fallback {
  71.         proxy_pass http://127.0.0.1:8080;
  72.         proxy_redirect http://127.0.0.1:8080 /;
  73.         proxy_set_header Host $host;
  74.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  75.         proxy_set_header X-Forwarded-Proto $scheme;
  76.         access_log off;
  77.     }
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement