DJ_1420

Untitled

Feb 8th, 2017
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. # You may add here your
  2. # server {
  3. # ...
  4. # }
  5. # statements for each of your virtual hosts to this file
  6.  
  7. ##
  8. # You should look at the following URL's in order to grasp a solid understanding
  9. # of Nginx configuration files in order to fully unleash the power of Nginx.
  10. # http://wiki.nginx.org/Pitfalls
  11. # http://wiki.nginx.org/QuickStart
  12. # http://wiki.nginx.org/Configuration
  13. #
  14. # Generally, you will want to move this file somewhere, and start with a clean
  15. # file but keep this around for reference. Or just disable in sites-enabled.
  16. #
  17. # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
  18. ##
  19.  
  20. server {
  21. listen 80;
  22. listen [::]:80;
  23.  
  24. root /usr/share/nginx/html;
  25. index index.php index.html;
  26.  
  27. # Make site accessible from http://localhost/
  28. server_name localhost;
  29.  
  30. location / {
  31. # First attempt to serve request as file, then
  32. # as directory, then fall back to displaying a 404.
  33. try_files $uri $uri/ /index.php?$args;
  34. # Uncomment to enable naxsi on this location
  35. # include /etc/nginx/naxsi.rules
  36. }
  37.  
  38. location ~ \.php$ {
  39. try_files $uri = 404;
  40. fastcgi_pass 127.0.0.1:9000;
  41. fastcgi_index index.php;
  42. include fastcgi_params;
  43. }
  44.  
  45. error_page 404 /404.php;
  46.  
  47. }
Advertisement
Add Comment
Please, Sign In to add comment