server { server_name dev.ghunter.ru www.dev.ghunter.ru; charset UTF-8; index index.php index.html; disable_symlinks if_not_owner from=$root_path; include /etc/nginx/vhosts-includes/*.conf; include /etc/nginx/vhosts-resources/dev.ghunter.ru/*.conf; access_log /var/www/httpd-logs/dev.ghunter.ru.access.log; error_log /var/www/httpd-logs/dev.ghunter.ru.error.log notice; ssi on; set $root_path /var/www/ghunter.ru/data/www/dev.ghunter.ru; location / { location ~ [^/]\.ph(p\d*|tml)$ { try_files /does_not_exists @php; } } root $root_path; listen 5.45.127.168:80; location @php { fastcgi_index index.php; fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@dev.ghunter.ru"; fastcgi_pass unix:/var/www/php-fpm/ghunter.ru.sock; fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$; try_files $uri =404; include fastcgi_params; } } server { server_name dev.ghunter.ru www.dev.ghunter.ru; ssl_certificate "/var/www/httpd-cert/ghunter.ru/dev.ghunter.ru_le1.crtca"; ssl_certificate_key "/var/www/httpd-cert/ghunter.ru/dev.ghunter.ru_le1.key"; ssl_ciphers EECDH:+AES256:-3DES:RSA+AES:!NULL:!RC4; ssl_prefer_server_ciphers on; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; add_header Strict-Transport-Security "max-age=31536000;"; ssl_dhparam /etc/ssl/certs/dhparam4096.pem; index index.php index.html; disable_symlinks if_not_owner from=$root_path; include /etc/nginx/vhosts-includes/*.conf; include /etc/nginx/vhosts-resources/dev.ghunter.ru/*.conf; access_log /var/www/httpd-logs/dev.ghunter.ru.access.log; error_log /var/www/httpd-logs/dev.ghunter.ru.error.log notice; ssi on; set $root_path /var/www/ghunter.ru/data/www/dev.ghunter.ru; root $root_path; location / { proxy_pass http://dev.ghunter.ru:4000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; location ~ [^/]\.ph(p\d*|tml)$ { try_files /does_not_exists @php; } } location /frontend/ { location ~ [^/]\.ph(p\d*|tml)$ { try_files /does_not_exists @fallback; } location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ { try_files $uri $uri/ @fallback; } location /frontend/ { try_files /does_not_exists @fallback; } } location /backend/ { location ~ [^/]\.ph(p\d*|tml)$ { try_files /does_not_exists @fallback; } location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ { try_files $uri $uri/ @fallback; } location /backend/ { try_files /does_not_exists @fallback; } } charset UTF-8; listen 5.45.127.168:443 ssl; location @php { fastcgi_index index.php; fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@dev.ghunter.ru"; fastcgi_pass unix:/var/www/php-fpm/ghunter.ru.sock; fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$; try_files $uri =404; include fastcgi_params; } }