Advertisement
Guest User

Untitled

a guest
Oct 24th, 2013
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.83 KB | None | 0 0
  1. user www-data;
  2. worker_processes 4;
  3. pid /run/nginx.pid;
  4.  
  5. events {
  6. worker_connections 768;
  7. # multi_accept on;
  8. }
  9.  
  10. http {
  11.  
  12. ##
  13. # Basic Settings
  14. ##
  15.  
  16. sendfile on;
  17. tcp_nopush on;
  18. tcp_nodelay on;
  19. keepalive_timeout 65;
  20. types_hash_max_size 2048;
  21. # server_tokens off;
  22.  
  23. # server_names_hash_bucket_size 64;
  24. # server_name_in_redirect off;
  25.  
  26. include /etc/nginx/mime.types;
  27. default_type application/octet-stream;
  28.  
  29. ##
  30. # Logging Settings
  31. ##
  32.  
  33. access_log /var/log/nginx/access.log;
  34. error_log /var/log/nginx/error.log;
  35.  
  36. ##
  37. # Gzip Settings
  38. ##
  39.  
  40. gzip on;
  41. gzip_disable "msie6";
  42.  
  43. # gzip_vary on;
  44. # gzip_proxied any;
  45. # gzip_comp_level 6;
  46. # gzip_buffers 16 8k;
  47. # gzip_http_version 1.1;
  48. # gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
  49.  
  50. ##
  51. # nginx-naxsi config
  52. ##
  53. # Uncomment it if you installed nginx-naxsi
  54. ##
  55.  
  56. #include /etc/nginx/naxsi_core.rules;
  57.  
  58. ##
  59. # nginx-passenger config
  60. ##
  61. # Uncomment it if you installed nginx-passenger
  62. ##
  63.  
  64. #passenger_root /usr;
  65. #passenger_ruby /usr/bin/ruby;
  66.  
  67. ##
  68. # Virtual Host Configs
  69. ##
  70.  
  71. include /etc/nginx/conf.d/*.conf;
  72. include /etc/nginx/sites-enabled/*;
  73.  
  74. server {
  75. server_name mysite.com ;
  76.  
  77. access_log /var/log/nginx/mysite.com.access.log;
  78. error_log /var/log/nginx/mysite.com.error.log debug;
  79.  
  80. root /srv/www/mysite.com/public_html ;
  81. index index.php;
  82.  
  83. if (!-e $request_filename) {
  84. rewrite /wp-admin$ $scheme://$host$uri/ permanent;
  85. rewrite ^/multisite(/[^/]+)?(/wp-.*) /multisite$2 last;
  86. rewrite ^/multisite(/[^/]+)?(/.*\.php)$ /multisite$2 last;
  87. }
  88.  
  89. location / {
  90. try_files $uri $uri/ /multisite/index.php?$args ;
  91. }
  92.  
  93. location ~ \.php$ {
  94. try_files $uri =404
  95. include fastcgi_params;
  96. fastcgi_pass unix:/var/run/php5-fpm.sock;
  97. }
  98.  
  99. location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
  100. access_log off; log_not_found off; expires max;
  101. }
  102.  
  103. location = /robots.txt { access_log off; log_not_found off; }
  104. location ~ /\. { deny all; access_log off; log_not_found off; }
  105. }
  106.  
  107. }
  108.  
  109.  
  110. #mail {
  111. # # See sample authentication script at:
  112. # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
  113. #
  114. # # auth_http localhost/auth.php;
  115. # # pop3_capabilities "TOP" "USER";
  116. # # imap_capabilities "IMAP4rev1" "UIDPLUS";
  117. #
  118. # server {
  119. # listen localhost:110;
  120. # protocol pop3;
  121. # proxy on;
  122. # }
  123. #
  124. # server {
  125. # listen localhost:143;
  126. # protocol imap;
  127. # proxy on;
  128. # }
  129. #}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement