Advertisement
Guest User

Untitled

a guest
Aug 21st, 2014
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 KB | None | 0 0
  1. server {
  2. listen 8080;
  3. server_name _;
  4. #charset koi8-r;
  5.  
  6. #access_log logs/host.access.log main;
  7.  
  8. location / {
  9. root /usr/local/nginx/html/rutorrent/;
  10. index index.php index.html index.htm;
  11. deny all;
  12. allow 82.245.1.104;
  13. }
  14.  
  15. #error_page 404 /404.html;
  16.  
  17. # redirect server error pages to the static page /50x.html
  18. #
  19. error_page 500 502 503 504 /50x.html;
  20. location = /50x.html {
  21. root html;
  22. }
  23.  
  24. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  25. #
  26. #location ~ \.php$ {
  27. # proxy_pass http://127.0.0.1;
  28. #}
  29.  
  30. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  31. #
  32. location ~* \.php$ {
  33. root /usr/local/nginx/html/;
  34. fastcgi_pass unix:/var/run/php5-fpm.sock;
  35. # fastcgi_pass 127.0.0.1:9000;
  36. fastcgi_index index.php;
  37. fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  38. include fastcgi_params;
  39. }
  40.  
  41. # deny access to .htaccess files, if Apache's document root
  42. # concurs with nginx's one
  43. #
  44. location ~ /\.ht {
  45. deny all;
  46. }
  47. }
  48.  
  49.  
  50.  
  51.  
  52. server {
  53. listen 80;
  54. server_name _;
  55. #charset koi8-r;
  56.  
  57. #access_log logs/host.access.log main;
  58.  
  59. location / {
  60. root /usr/local/nginx/html/;
  61. index index.php index.html index.htm;
  62. allow all
  63. }
  64.  
  65. #error_page 404 /404.html;
  66.  
  67. # redirect server error pages to the static page /50x.html
  68. #
  69. error_page 500 502 503 504 /50x.html;
  70. location = /50x.html {
  71. root html;
  72. }
  73.  
  74. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  75. #
  76. #location ~ \.php$ {
  77. # proxy_pass http://127.0.0.1;
  78. #}
  79.  
  80. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  81. #
  82. location ~* \.php$ {
  83. root /usr/local/nginx/html/;
  84. fastcgi_pass unix:/var/run/php5-fpm.sock;
  85. # fastcgi_pass 127.0.0.1:9000;
  86. fastcgi_index index.php;
  87. fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  88. include fastcgi_params;
  89. }
  90.  
  91. # deny access to .htaccess files, if Apache's document root
  92. # concurs with nginx's one
  93. #
  94. location ~ /\.ht {
  95. deny all;
  96. }
  97. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement