Advertisement
Guest User

Untitled

a guest
May 18th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.68 KB | None | 0 0
  1. server {
  2.     listen 116.203.5.78:80;
  3.     server_name *.site.ru site.ru;
  4.     return 301 https://site.ru$request_uri;
  5. }
  6.  
  7. server {
  8.     listen 116.203.5.78:443 ssl http2;
  9.     server_name *.site.ru site.ru;
  10.  
  11.     ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  12.     ssl_ciphers  "HIGH:!RC4:!aNULL:!MD5:!kEDH";
  13.     ssl_certificate /etc/letsencrypt/live/site.ru/fullchain.pem;
  14.     ssl_certificate_key /etc/letsencrypt/live/site.ru/privkey.pem;
  15.     add_header Strict-Transport-Security max-age=604800;
  16.  
  17.     access_log /var/log/nginx/access/site.ru.log;
  18.     error_log  /var/log/nginx/errors/site.ru.log;
  19.  
  20.     root /var/www/site.ru;
  21.     index index.php;
  22.  
  23.     location = /favicon.ico {
  24.             log_not_found off;
  25.             access_log off;
  26.     }
  27.  
  28.     location = /robots.txt {
  29.             allow all;
  30.             log_not_found off;
  31.             access_log off;
  32.     }
  33.  
  34.     location / {
  35.         try_files $uri $uri/ /index.php?$args;
  36.     }
  37.  
  38.     #if ( $scheme = "http" ) {
  39.     #    rewrite ^(.*)$ https://site.ru$1 permanent;
  40.     #}
  41.  
  42.     #if ($host != 'site.ru' ) {
  43.     #    rewrite ^(.*)$  https://site.ru$1 permanent;
  44.     #}
  45.  
  46.     rewrite  ^/wp-admin/?$  /wp-admin/index.php permanent;
  47.  
  48.     location /.well-known {
  49.         allow all;
  50.     }
  51.  
  52.     location ~ \.php$ {
  53.         fastcgi_index index.php;
  54.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  55.         fastcgi_buffers 16 16k;
  56.         fastcgi_buffer_size 32k;
  57.         include       fastcgi_params;
  58.         fastcgi_pass  127.0.0.1:9000;
  59.     }
  60.  
  61.  
  62.     location ~ \.(css|js|gif|jpg|png|svg|ttf|txt|doc|pdf|rtf|swf|xsl|woff|eot|woff2|ttf|svg|html|ico) {
  63.         expires   60d;
  64.         access_log off;
  65.     }
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement