Advertisement
keha76

nginx server block

Dec 27th, 2013
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.48 KB | None | 0 0
  1. server {
  2.     listen 80;
  3.     server_name kenthhagstrom.se *.kenthhagstrom.se;
  4.     return 301 http://kenthhagstrom.se$request_uri;
  5.    
  6.     index index.php;
  7.     root /www/kenthhagstrom.se/public;
  8.  
  9.     # Logging
  10.     access_log  off;
  11.  
  12.     location ~ \.php$ {
  13.         try_files $uri =404;
  14.         fastcgi_index index.php;
  15.         fastcgi_pass unix:/var/run/php5-fpm.sock;
  16.         include fastcgi_params;
  17.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  18.         fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement