Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 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 domain.com;
  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 /doc/ {
  20. alias /usr/share/doc/;
  21. autoindex on;
  22. allow 127.0.0.1;
  23. allow ::1;
  24. deny all;
  25. }
  26.  
  27. location /cacti {
  28. autoindex on;
  29. alias /usr/share/cacti/site;
  30. index index.php index.html index.htm;
  31. location ~ .php$ {
  32. try_files $uri =404;
  33. fastcgi_pass unix:/var/run/php5-fpm.sock;
  34. fastcgi_index index.php;
  35. #fastcgi_param SCRIPT_FILENAME $document_root$request_filename;
  36. include fastcgi_params;
  37. fastcgi_param SCRIPT_FILENAME /usr/share$request_filename;
  38. }
  39. }
  40.  
  41.  
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement