Advertisement
Guest User

combined

a guest
May 31st, 2013
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1. ##
  2. # Default
  3. ##
  4. server {
  5. listen 80; ## listen for ipv4; this line is default and implied
  6. root /usr/share/nginx/www;
  7. index index.php index.html index.htm;
  8.  
  9. # Make site accessible from http://localhost/
  10. server_name localhost;
  11.  
  12. location / {
  13. try_files $uri $uri/ /index.html;
  14. }
  15.  
  16. location /doc/ {
  17. alias /usr/share/doc/;
  18. autoindex on;
  19. allow 127.0.0.1;
  20. allow ::1;
  21. deny all;
  22. }
  23.  
  24. #error_page 500 502 503 504 /50x.html;
  25. location = /50x.html {
  26. root /usr/share/nginx/www;
  27. }
  28.  
  29. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  30. location ~ \.php$ {
  31. fastcgi_pass unix:/var/run/php5-fpm.sock;
  32. fastcgi_index index.php;
  33. include fastcgi_params;
  34. }
  35.  
  36. location ~ /\.ht {
  37. deny all;
  38. }
  39. }
  40.  
  41.  
  42. server {
  43. listen 80;
  44.  
  45.  
  46. root /usr/share/nginx/blog.mydomian.com;
  47. index index.php index.html index.htm;
  48.  
  49. server_name blog.mydomian.com;
  50.  
  51. location / {
  52. try_files $uri $uri/ /index.php?q=$uri&$args;
  53. }
  54.  
  55. error_page 404 /404.html;
  56.  
  57. error_page 500 502 503 504 /50x.html;
  58. location = /50x.html {
  59. root /usr/share/nginx/www;
  60. }
  61.  
  62. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9$
  63. location ~ \.php$ {
  64. #fastcgi_pass 127.0.0.1:9000;
  65. # With php5-fpm:
  66. fastcgi_pass unix:/var/run/php5-fpm.sock;
  67. fastcgi_index index.php;
  68. include fastcgi_params;
  69. }
  70.  
  71.  
  72. }
  73.  
  74.  
  75. # HTTPS server
  76. #
  77. #server {
  78. # listen 443;
  79. # server_name localhost;
  80. #
  81. # root html;
  82. # index index.html index.htm;
  83. #
  84. # ssl on;
  85. # ssl_certificate cert.pem;
  86. # ssl_certificate_key cert.key;
  87. #
  88. # ssl_session_timeout 5m;
  89. #
  90. # ssl_protocols SSLv3 TLSv1;
  91. # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
  92. # ssl_prefer_server_ciphers on;
  93. #
  94. # location / {
  95. # try_files $uri $uri/ =404;
  96. # }
  97. #}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement