Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server { server_name www.<siteName>.ru;
- ssl_certificate "/var/www/httpd-cert/<siteName>/<siteName>.ru_le1.crtca";
- ssl_certificate_key "/var/www/httpd-cert/<siteName>/<siteName>.ru_le1.key";
- ssl_ciphers EECDH:+AES256:-3DES:RSA+AES:!NULL:!RC4;
- ssl_prefer_server_ciphers on;
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- ssl_dhparam /etc/ssl/certs/dhparam4096.pem;
- return 301 https://<siteName>.ru:443$request_uri;
- listen <IP>:80;
- listen <IP>:443 ssl;
- }
- server {
- server_name <siteName>.ru ;
- charset off;
- disable_symlinks if_not_owner from=$root_path;
- include /etc/nginx/vhosts-includes/*.conf;
- include /etc/nginx/vhosts-resources/<siteName>.ru/*.conf;
- error_log /var/www/httpd-logs/<siteName>.ru.error.log notice;
- ssi on;
- set $root_path /var/www/<siteName>/data/www/<siteName>.ru;
- root $root_path;
- location / {
- location ~ [^/]\.ph(p\d*|tml)$ {
- try_files /does_not_exists @php;
- }
- location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
- expires max;
- }
- }
- gzip on;
- gzip_comp_level 8;
- gzip_disable "msie6";
- gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
- location @php {
- fastcgi_index index.php;
- fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@<siteName>.ru";
- fastcgi_pass unix:/var/www/php-fpm/<siteName>.sock;
- fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
- try_files $uri = /404.php;
- include fastcgi_params;
- }
- access_log off;
- return 301 https://$host:443$request_uri;
- listen <IP>:80;
- error_page 404 /404.php;
- location = /404.php {
- root /var/www/<siteName>/data/www/<siteName>.ru;
- internal;
- }
- }
- server {
- server_name <siteName>.ru ;
- ssl_certificate "/var/www/httpd-cert/<siteName>/<siteName>.ru_le1.crtca";
- ssl_certificate_key "/var/www/httpd-cert/<siteName>/<siteName>.ru_le1.key";
- ssl_ciphers EECDH:+AES256:-3DES:RSA+AES:!NULL:!RC4;
- ssl_prefer_server_ciphers on;
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- ssl_dhparam /etc/ssl/certs/dhparam4096.pem;
- charset off;
- disable_symlinks if_not_owner from=$root_path;
- include /etc/nginx/vhosts-includes/*.conf;
- include /etc/nginx/vhosts-resources/<siteName>.ru/*.conf;
- error_log /var/www/httpd-logs/<siteName>.ru.error.log notice;
- ssi on;
- set $root_path /var/www/<siteName>/data/www/<siteName>.ru;
- root $root_path;
- gzip on;
- gzip_comp_level 8;
- gzip_disable "msie6";
- gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
- location / {
- location ~ [^/]\.ph(p\d*|tml)$ {
- try_files /does_not_exists @php;
- }
- location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
- expires max;
- }
- }
- location @php {
- fastcgi_index index.php;
- fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@<siteName>.ru";
- fastcgi_pass unix:/var/www/php-fpm/<siteName>.sock;
- fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
- try_files $uri =404;
- include fastcgi_params;
- fastcgi_intercept_errors on;
- }
- add_header Strict-Transport-Security "max-age=31536000;";
- access_log off;
- listen <IP>:443 ssl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement