Advertisement
Guest User

Untitled

a guest
Jan 20th, 2014
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.15 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; ## listen for ipv4; this line is default and implied
  22. listen 443;
  23. ssl on;
  24. ssl_certificate /etc/nginx/ssl/domainb/ssl-unified.crt;
  25. ssl_certificate_key /etc/nginx/ssl/domainb/ssl.key;
  26.  
  27. #listen [::]:80 default ipv6only=on; ## listen for ipv6
  28.  
  29. root /var/www/domainb.com/akc;
  30. index index.php index.html index.htm;
  31.  
  32. # Make site accessible from http://localhost/
  33. server_name akc.domainb.com;
  34. server_name_in_redirect off;
  35.  
  36. location / {
  37. # First attempt to serve request as file, then
  38. # as directory, then fall back to index.html
  39. try_files $uri $uri/ /index.html /index.php?$args;
  40. # Uncomment to enable naxsi on this location
  41. # include /etc/nginx/naxsi.rules
  42.  
  43. }
  44.  
  45. location /doc/ {
  46. alias /usr/share/doc/;
  47. autoindex on;
  48. allow 127.0.0.1;
  49. deny all;
  50. }
  51. # deny running scripts inside writable directories
  52. location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
  53. return 403;
  54. error_page 403 /403_error.html;
  55. }
  56.  
  57. # Only for nginx-naxsi : process denied requests
  58. #location /RequestDenied {
  59. # For example, return an error code
  60. #return 418;
  61. #}
  62.  
  63. #error_page 404 /404.html;
  64.  
  65. # redirect server error pages to the static page /50x.html
  66. #
  67. #error_page 500 502 503 504 /50x.html;
  68. #location = /50x.html {
  69. # root /usr/share/nginx/www;
  70. #}
  71.  
  72. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  73. #
  74. location ~ \.php$ {
  75. # fastcgi_split_path_info ^(.+\.php)(/.+)$;
  76. # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
  77. #
  78. # # With php5-cgi alone:
  79. # fastcgi_pass 127.0.0.1:9000;
  80. # # With php5-fpm:
  81. fastcgi_pass unix:/var/run/php5-fpm.sock;
  82. fastcgi_index index.php;
  83. include fastcgi_params;
  84. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  85. include fastcgi_params;
  86. }
  87. # caching of files
  88. location ~* \.(ico|pdf|flv)$ {
  89. expires 1y;
  90. }
  91.  
  92. location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
  93. expires 14d;
  94. }
  95.  
  96. # deny access to .htaccess files, if Apache's document root
  97. # concurs with nginx's one
  98. #
  99. #location ~ /\.ht {
  100. # deny all;
  101. #}
  102. }
  103.  
  104.  
  105. # another virtual host using mix of IP-, name-, and port-based configuration
  106. #
  107. #server {
  108. # listen 8000;
  109. # listen somename:8080;
  110. # server_name somename alias another.alias;
  111. # root html;
  112. # index index.html index.htm;
  113. #
  114. # location / {
  115. # try_files $uri $uri/ /index.html;
  116. # }
  117. #}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement