Advertisement
Guest User

Untitled

a guest
Nov 4th, 2013
122
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 80;
  3.  
  4. root /home/user/www/site1;
  5. index index.php;
  6.  
  7. server_name site.ru www.site1.ru;
  8.  
  9. location / {
  10. try_files $uri $uri/ /index.php?$args;
  11. }
  12.  
  13. error_page 404 /404.html;
  14.  
  15. error_page 500 502 503 504 /50x.html;
  16. location = /50x.html {
  17. root /usr/share/nginx/www;
  18. }
  19.  
  20. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  21. location ~ \.php$ {
  22. try_files $uri =404;
  23. fastcgi_pass unix:/var/run/php5-fpm.sock;
  24. fastcgi_index index.php;
  25. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  26. include fastcgi_params;
  27.  
  28.  
  29. }
  30.  
  31.  
  32. server {
  33. listen 80;
  34.  
  35.  
  36. root /home/user1/www/site2.ru;
  37. index index.php index.html index.htm;
  38.  
  39. server_name site2.ru;
  40.  
  41. location / {
  42. try_files $uri $uri/ /index.html;
  43. }
  44.  
  45. error_page 404 /404.html;
  46.  
  47. error_page 500 502 503 504 /50x.html;
  48. location = /50x.html {
  49. root /usr/share/nginx/www;
  50. }
  51.  
  52. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  53. location ~ \.php$ {
  54. try_files $uri =404;
  55. fastcgi_pass unix:/var/run/php5-fpm.sock;
  56. fastcgi_index index.php;
  57. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  58. include fastcgi_params;
  59.  
  60. }
  61.  
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement