Guest User

Untitled

a guest
Jun 29th, 2013
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.26 KB | None | 0 0
  1. # -*- mode: nginx; mode: flyspell-prog; ispell-current-dictionary: american -*-
  2.  
  3. ## Redirect WWW to non-WWW
  4. server {
  5. limit_conn arbeit 32;
  6. listen 80;
  7. server_name www.mysite.com;
  8. access_log off;
  9. rewrite ^ $scheme://mysite.com$request_uri? permanent;
  10. }
  11.  
  12. ## HTTP server
  13. server {
  14. listen 80; # IPv4
  15. ## Replace the IPv6 address by your own address. The address below
  16. ## was stolen from the wikipedia page on IPv6.
  17. #listen [fe80::202:b3ff:fe1e:8330]:80 ipv6only=on;
  18.  
  19. server_name mysite.com;
  20.  
  21. limit_conn arbeit 32;
  22.  
  23. ## Access and error logs.
  24. access_log /var/log/nginx/mysite.com_access.log;
  25. error_log /var/log/nginx/mysite.com_error.log;
  26.  
  27. ## See the blacklist.conf file at the parent dir: /etc/nginx.
  28. ## Deny access based on the User-Agent header.
  29. if ($bad_bot) {
  30. return 444;
  31. }
  32. ## Deny access based on the Referer header.
  33. if ($bad_referer) {
  34. return 444;
  35. }
  36.  
  37. ## Protection against illegal HTTP methods. Out of the box only HEAD,
  38. ## GET and POST are allowed.
  39. if ($not_allowed_method) {
  40. return 405;
  41. }
  42.  
  43. ## Filesystem root of the site and index.
  44. root /var/www/drupal6;
  45. index index.php;
  46.  
  47. ## If you're using a Nginx version greater or equal to 1.1.4 then
  48. ## you can use keep alive connections to the upstream be it
  49. ## FastCGI or Apache. If that's not the case comment out the line below.
  50. fastcgi_keep_conn on; # keep alive to the FCGI upstream
  51.  
  52. ## Uncomment if you're proxying to Apache for handling PHP.
  53. #proxy_http_version 1.1; # keep alive to the Apache upstream
  54.  
  55.  
  56. ################################################################
  57. ### Generic configuration: for most Drupal 6 sites.
  58. ################################################################
  59. #include apps/drupal/drupal6.conf;
  60.  
  61.  
  62. #################################################################
  63. ### Configuration for Drupal 6 sites that use boost.
  64. #################################################################
  65. include apps/drupal/drupal_boost6.conf;
  66.  
  67. #################################################################
  68. ### Configuration for updating the site via update.php and running
  69. ### cron externally. If you don't use drush for running cron use
  70. ### the configuration below.
  71. #################################################################
  72. #include apps/drupal/drupal_cron_update.conf;
  73.  
  74. #################################################################
  75. ### Support for upload progress bar. Configurations differ for
  76. ### Drupal 6 and Drupal 7.
  77. #################################################################
  78.  
  79.  
  80. ## This is for Drupal 6. Comment out the line above and uncomment
  81. ## the line below if you're on Drupla 6.
  82. #include /etc/nginx/apps/drupal/drupal6_upload_progress.conf;
  83.  
  84. ## Including the php-fpm status and ping pages config.
  85. ## Uncomment to enable if you're running php-fpm.
  86. #include /etc/nginx/php_fpm_status_vhost.conf;
  87.  
  88. ## Including the Nginx stub status page for having stats about
  89. ## Nginx activity: http://wiki.nginx.org/HttpStubStatusModule.
  90. #include /etc/nginx/nginx_status_vhost.conf;
  91.  
  92.  
  93. } # HTTP server
Advertisement
Add Comment
Please, Sign In to add comment