Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 116.203.5.78:80;
- server_name *.site.ru site.ru;
- return 301 https://site.ru$request_uri;
- }
- server {
- listen 116.203.5.78:443 ssl http2;
- server_name *.site.ru site.ru;
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- ssl_ciphers "HIGH:!RC4:!aNULL:!MD5:!kEDH";
- ssl_certificate /etc/letsencrypt/live/site.ru/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/site.ru/privkey.pem;
- add_header Strict-Transport-Security max-age=604800;
- access_log /var/log/nginx/access/site.ru.log;
- error_log /var/log/nginx/errors/site.ru.log;
- root /var/www/site.ru;
- index index.php;
- location = /favicon.ico {
- log_not_found off;
- access_log off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- location / {
- try_files $uri $uri/ /index.php?$args;
- }
- #if ( $scheme = "http" ) {
- # rewrite ^(.*)$ https://site.ru$1 permanent;
- #}
- #if ($host != 'site.ru' ) {
- # rewrite ^(.*)$ https://site.ru$1 permanent;
- #}
- rewrite ^/wp-admin/?$ /wp-admin/index.php permanent;
- location /.well-known {
- allow all;
- }
- location ~ \.php$ {
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_buffers 16 16k;
- fastcgi_buffer_size 32k;
- include fastcgi_params;
- fastcgi_pass 127.0.0.1:9000;
- }
- location ~ \.(css|js|gif|jpg|png|svg|ttf|txt|doc|pdf|rtf|swf|xsl|woff|eot|woff2|ttf|svg|html|ico) {
- expires 60d;
- access_log off;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement