Guest User

nginx config

a guest
Mar 29th, 2012
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. user http;
  2. worker_processes 1;
  3.  
  4. error_log /var/log/nginx/error.log;
  5.  
  6. events {
  7. worker_connections 4096;
  8. }
  9.  
  10. http {
  11. access_log /var/log/nginx/access.log;
  12.  
  13. include /etc/nginx/conf/mime.types;
  14.  
  15. sendfile on;
  16. keepalive_timeout 65;
  17. tcp_nodelay on;
  18.  
  19. default_type application/octet-stream;
  20.  
  21. gzip on;
  22. gzip_disable "MSIE [1-6]\.(?!.*SV1)";
  23.  
  24. server {
  25. access_log /var/log/nginx/localhost.access.log;
  26.  
  27. listen 80;
  28. server_name localhost;
  29. root /srv/http;
  30.  
  31. ## Default location
  32. location / {
  33. index index.php index.html;
  34. }
  35.  
  36. ## Images and static content is treated different
  37. location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
  38. access_log off;
  39. expires 30d;
  40. }
  41.  
  42. location ~ \.css {
  43. add_header Content-Type text/css;
  44. }
  45.  
  46. ## Include external php config
  47. include php.conf;
  48.  
  49. ## Disable viewing .htaccess & .htpassword
  50. location ~ /\.ht {
  51. deny all;
  52. }
  53.  
  54. }#end server
  55.  
  56. } #end http
  57.  
  58. # mail {
  59. # # See sample authentication script at:
  60. # # http://wiki.nginx.org/NginxImapAuthenticateWithApachePhpScript
  61. #
  62. # # auth_http localhost/auth.php;
  63. # # pop3_capabilities "TOP" "USER";
  64. # # imap_capabilities "IMAP4rev1" "UIDPLUS";
  65. #
  66. # server {
  67. # listen localhost:110;
  68. # protocol pop3;
  69. # proxy on;
  70. # }
  71. #
  72. # server {
  73. # listen localhost:143;
  74. # protocol imap;
  75. # proxy on;
  76. # }
  77. # }
Advertisement
Add Comment
Please, Sign In to add comment