Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.31 KB | None | 0 0
  1. server {
  2.     listen 80;
  3.     listen [::]:80;
  4.     root /var/www/insane-marketing.top;
  5.     index index.html index.htm index.nginx-debian.html;
  6.     server_name insane-marketing.top www.insane-marketing.top;
  7.     location / {
  8.         try_files $uri $uri/ =404;
  9.     }
  10.     if ($scheme = http) {
  11.         return 301 https://$server_name$request_uri;
  12.     }
  13. }
  14.  
  15. server {
  16.     listen 443;
  17.     listen [::]:443;
  18.     server_name www.insane-marketing.top;
  19.     return 301 http://insane-marketing.top$request_uri;
  20. }
  21.  
  22.  
  23. server {
  24.     listen 443 ssl;
  25.     listen [::]:443 ssl;
  26.  
  27.     ssl on;
  28.     ssl_certificate     /etc/ssl/insane-marketing.top.crt;
  29.     ssl_certificate_key /etc/ssl/insane-marketing.top.private.key;
  30.  
  31.     root /var/www/insane-marketing.top;
  32.     index index.php index.html index.htm index.nginx-debian.html;
  33.  
  34.     server_name insane-marketing.top;
  35.  
  36.     if ($request_uri ~* "^(.*/)index\.(html|php)$") { return 301 $1; }
  37.  
  38.     error_page 403 404 /404/index.html;
  39.  
  40.     location = /favicon.ico { log_not_found off; access_log off; }
  41.     location = /robots.txt { log_not_found off; access_log off; allow all; }
  42.     location ~* \.(css|gif|ico|jpeg|jpg|js|png|ttf)$ {
  43.         expires max;
  44.         log_not_found off;
  45.     }
  46.  
  47.     location ~ \.php$ {
  48.         include snippets/fastcgi-php.conf;
  49.         fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  50.     }
  51.  
  52.     location ~ /\.ht {
  53.         deny all;
  54.     }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement