Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- server_name www.domain.com domain.com;
- listen 80;
- return 301 https://domain.com$request_uri;
- }
- server {
- server_name www.domain.com
- listen 443 ssl;
- /* SSL Stuff */
- return 301 https://domain.com$request_uri;
- }
- server {
- server_name domain.com;
- index index.php index.html index.htm;
- listen 443 ssl;
- root /usr/share/nginx/domain.com;
- /* SSL Stuff */
- location / {
- try_files $uri $uri/ /index.php?$args;
- }
- location ~ .php$ {
- try_files $uri =404;
- fastcgi_pass unix:/run/php/php7.0-fpm.sock;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- location ~ /. {
- deny all;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement