Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- listen [::]:80;
- root /var/www/insane-marketing.top;
- index index.html index.htm index.nginx-debian.html;
- server_name insane-marketing.top www.insane-marketing.top;
- location / {
- try_files $uri $uri/ =404;
- }
- if ($scheme = http) {
- return 301 https://$server_name$request_uri;
- }
- }
- server {
- listen 443;
- listen [::]:443;
- server_name www.insane-marketing.top;
- return 301 http://insane-marketing.top$request_uri;
- }
- server {
- listen 443 ssl;
- listen [::]:443 ssl;
- ssl on;
- ssl_certificate /etc/ssl/insane-marketing.top.crt;
- ssl_certificate_key /etc/ssl/insane-marketing.top.private.key;
- root /var/www/insane-marketing.top;
- index index.php index.html index.htm index.nginx-debian.html;
- server_name insane-marketing.top;
- if ($request_uri ~* "^(.*/)index\.(html|php)$") { return 301 $1; }
- error_page 403 404 /404/index.html;
- location = /favicon.ico { log_not_found off; access_log off; }
- location = /robots.txt { log_not_found off; access_log off; allow all; }
- location ~* \.(css|gif|ico|jpeg|jpg|js|png|ttf)$ {
- expires max;
- log_not_found off;
- }
- location ~ \.php$ {
- include snippets/fastcgi-php.conf;
- fastcgi_pass unix:/run/php/php7.0-fpm.sock;
- }
- location ~ /\.ht {
- deny all;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement