Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2013
808
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.92 KB | None | 0 0
  1. user www-data; worker_processes 4; pid /run/nginx.pid; events {
  2. worker_connections 768;
  3. # multi_accept on;
  4. }
  5. http {
  6. ##
  7. # Basic Settings
  8. ##
  9. sendfile on;
  10. tcp_nopush on;
  11. tcp_nodelay on;
  12. keepalive_timeout 65;
  13. types_hash_max_size 2048;
  14. # server_tokens off; server_names_hash_bucket_size 64; server_name_in_redirect off;
  15. include /etc/nginx/mime.types;
  16. default_type application/octet-stream;
  17. ##
  18. # Logging Settings
  19. ##
  20. access_log /var/log/nginx/access.log;
  21. error_log /var/log/nginx/error.log;
  22. ##
  23. # Gzip Settings
  24. ##
  25. gzip on;
  26. gzip_disable "msie6";
  27. # gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_buffers 16 8k; gzip_http_version 1.1;
  28. # gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml
  29. # application/xml+rss text/javascript;
  30. ##
  31. # nginx-naxsi config
  32. ##
  33. # Uncomment it if you installed nginx-naxsi
  34. ##
  35. #include /etc/nginx/naxsi_core.rules;
  36. ##
  37. # nginx-passenger config
  38. ##
  39. # Uncomment it if you installed nginx-passenger
  40. ##
  41.  
  42. #passenger_root /usr; passenger_ruby /usr/bin/ruby;
  43. ##
  44. # Virtual Host Configs
  45. ##
  46. include /etc/nginx/conf.d/*.conf;
  47. include /etc/nginx/sites-enabled/*;
  48.  
  49. server {
  50. server_name mysite.com ;
  51. access_log /var/log/nginx/mysite.com.access.log;
  52. error_log /var/log/nginx/mysite.com.error.log debug;
  53. root /srv/www/mysite.com/public_html ;
  54. index index.php;
  55. if (!-e $request_filename) {
  56. rewrite /wp-admin$ $scheme://$host$uri/ permanent;
  57. rewrite ^/multisite(/[^/]+)?(/wp-.*) /multisite$2 last;
  58. rewrite ^/multisite(/[^/]+)?(/.*\.php)$ /multisite$2 last;
  59. }
  60. location / {
  61. try_files $uri $uri/ /multisite/index.php?$args ;
  62. }
  63. location ~ \.php$ {
  64. try_files $uri /multisite/index.php;
  65. include fastcgi_params;
  66. fastcgi_pass unix:/var/run/php5-fpm.sock;
  67. }
  68. location ~*
  69. ^.+\.(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|m$
  70. {
  71. access_log off; log_not_found off; expires max;
  72. }
  73. location = /robots.txt { access_log off; log_not_found off; }
  74. location ~ /\. { deny all; access_log off; log_not_found off; }
  75. }
  76. }
  77. #mail {
  78. # # See sample authentication script at: http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
  79. #
  80. # # auth_http localhost/auth.php; pop3_capabilities "TOP" "USER"; imap_capabilities "IMAP4rev1"
  81. # # "UIDPLUS";
  82. #
  83. # server {
  84. # listen localhost:110; protocol pop3; proxy on;
  85. # }
  86. #
  87. # server {
  88. # listen localhost:143; protocol imap; proxy on;
  89. # }
  90. #}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement