Advertisement
Guest User

Untitled

a guest
Jan 10th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.59 KB | None | 0 0
  1. server {
  2.     listen 80;
  3.     listen [::]:80;
  4.     server_name advancedprogramms.com bm.advancedprogramms.com;
  5.     return 301 https://$host$request_uri;
  6. }
  7.  
  8. server {
  9.     listen 80;
  10.     listen [::]:80;
  11.  
  12.     root /srv/$http_host;
  13.  
  14.     index index.php index.html index.htm;
  15.  
  16.     server_name *.advancedprogramms.com advancedprograms.ru *.advancedprograms.ru advancedprogramms.ru *.advancedprogramms.ru;
  17.  
  18.     location / {
  19.         # First attempt to serve request as file, then
  20.         # as directory, then fall back to displaying a 404.
  21.         try_files $uri $uri/ =404;
  22.     }
  23.  
  24.     location ~ \.php$ {
  25.         include snippets/fastcgi-php.conf;
  26.    
  27.         # With php7.0-fpm:
  28.         fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  29.     }
  30.  
  31.     client_max_body_size 64m;
  32. }
  33.  
  34. server {
  35.     listen 443 ssl;
  36.     listen [::]:443 ssl;
  37.  
  38.     server_name advancedprogramms.com bm.advancedprogramms.com;
  39.  
  40.     root /srv/$http_host;
  41.  
  42.     index index.php index.html index.htm;
  43.  
  44.     keepalive_timeout   60;
  45.     ssl_certificate        /etc/letsencrypt/live/advancedprogramms.com/fullchain.pem;
  46.     ssl_certificate_key    /etc/letsencrypt/live/advancedprogramms.com/privkey.pem;
  47.     ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  48.     ssl_ciphers  "HIGH:!RC4:!aNULL:!MD5:!kEDH";
  49.     add_header Strict-Transport-Security 'max-age=604800';
  50.  
  51.     location / {
  52.         # First attempt to serve request as file, then
  53.         # as directory, then fall back to displaying a 404.
  54.         try_files $uri $uri/ =404;
  55.     }
  56.  
  57.     location ~ \.php$ {
  58.         include snippets/fastcgi-php.conf;
  59.  
  60.         # With php7.0-fpm:
  61.         fastcgi_param HTTPS on;
  62.         fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  63.     }
  64.  
  65.     client_max_body_size 64m;
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement