Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name www.domain.com;
- return 301 $scheme://domain.com$request_uri;
- }
- server {
- listen *:80;
- server_name domain.com;
- root /path/to/domain.com;
- index index.html index.htm index.php;
- charset utf-8;
- location / {
- try_files $uri $uri/ index.php$is_args$args;
- }
- location ~ \.php$ {
- try_files $uri /index.php =404;
- fastcgi_pass unix:/var/run/php5-fpm.sock;
- fastcgi_index index.php;
- fastcgi_split_path_info ^(.+\.php)(.*)$;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- }
- location ~ /\. {
- deny all;
- access_log off;
- log_not_found off;
- }
- location = /favicon.ico { log_not_found off; access_log off; }
- location = /robots.txt { log_not_found off; access_log off; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement