Guest User

sites-enabled/default

a guest
Aug 16th, 2014
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. server {
  2. #listen 80; ## listen for ipv4; this line is default and implied
  3. #listen [::]:80 default_server ipv6only=on; ## listen for ipv6
  4.  
  5. root /usr/share/nginx/www;
  6. index index.html index.htm;
  7.  
  8. # Make site accessible from http://localhost/
  9. server_name localhost;
  10.  
  11. location / {
  12. # First attempt to serve request as file, then
  13. # as directory, then fall back to displaying a 404.
  14. try_files $uri $uri/ /index.html;
  15. # Uncomment to enable naxsi on this location
  16. # include /etc/nginx/naxsi.rules
  17. }
  18.  
  19. location ~ \.php$ {
  20. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  21. # With php5-fpm:
  22. fastcgi_pass unix:/var/run/php5-fpm.sock;
  23. fastcgi_index index.php;
  24. include fastcgi_params;
  25. }
  26.  
  27. location /doc/ {
  28. alias /usr/share/doc/;
  29. autoindex on;
  30. allow 127.0.0.1;
  31. allow ::1;
  32. deny all;
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment