ramytamer

Untitled

Feb 25th, 2015
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. server {
  2. listen 40;
  3.  
  4. root /var/www;
  5. index index.php index.html index.htm;
  6.  
  7. server_name 95.85.14.62;
  8.  
  9. location / {
  10. # First attempt to serve request as file, then
  11. # as directory, then fall back to displaying a 404.
  12. try_files $uri $uri/ =404;
  13. # Uncomment to enable naxsi on this location
  14. # include /etc/nginx/naxsi.rules
  15. }
  16.  
  17. location ~ \.php$ {
  18. try_files $uri /index.php =404;
  19. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  20. fastcgi_pass unix:/var/run/php5-fpm.sock;
  21. fastcgi_index index.php;
  22. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  23. include fastcgi_params;
  24. }
  25.  
  26. }
  27.  
  28. server {
  29. listen 80 default_server;
  30. listen [::]:80 default_server ipv6only=on;
  31.  
  32. root /var/www/wageb/public;
  33. index index.php index.html index.htm;
  34.  
  35. # Make site accessible from http://localhost/
  36. server_name 95.85.14.62;
  37.  
  38. location / {
  39. # First attempt to serve request as file, then
  40. # as directory, then fall back to displaying a 404.
  41. try_files $uri $uri/ =404;
  42. # Uncomment to enable naxsi on this location
  43. # include /etc/nginx/naxsi.rules
  44. }
  45.  
  46. location ~ \.php$ {
  47. try_files $uri /index.php =404;
  48. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  49. fastcgi_pass unix:/var/run/php5-fpm.sock;
  50. fastcgi_index index.php;
  51. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  52. include fastcgi_params;
  53. }
  54.  
  55. }
Advertisement
Add Comment
Please, Sign In to add comment