Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- mode: nginx; mode: flyspell-prog; ispell-current-dictionary: american -*-
- ## Redirect WWW to non-WWW
- server {
- limit_conn arbeit 32;
- listen 80;
- server_name www.mysite.com;
- access_log off;
- rewrite ^ $scheme://mysite.com$request_uri? permanent;
- }
- ## HTTP server
- server {
- listen 80; # IPv4
- ## Replace the IPv6 address by your own address. The address below
- ## was stolen from the wikipedia page on IPv6.
- #listen [fe80::202:b3ff:fe1e:8330]:80 ipv6only=on;
- server_name mysite.com;
- limit_conn arbeit 32;
- ## Access and error logs.
- access_log /var/log/nginx/mysite.com_access.log;
- error_log /var/log/nginx/mysite.com_error.log;
- ## See the blacklist.conf file at the parent dir: /etc/nginx.
- ## Deny access based on the User-Agent header.
- if ($bad_bot) {
- return 444;
- }
- ## Deny access based on the Referer header.
- if ($bad_referer) {
- return 444;
- }
- ## Protection against illegal HTTP methods. Out of the box only HEAD,
- ## GET and POST are allowed.
- if ($not_allowed_method) {
- return 405;
- }
- ## Filesystem root of the site and index.
- root /var/www/drupal6;
- index index.php;
- ## If you're using a Nginx version greater or equal to 1.1.4 then
- ## you can use keep alive connections to the upstream be it
- ## FastCGI or Apache. If that's not the case comment out the line below.
- fastcgi_keep_conn on; # keep alive to the FCGI upstream
- ## Uncomment if you're proxying to Apache for handling PHP.
- #proxy_http_version 1.1; # keep alive to the Apache upstream
- ################################################################
- ### Generic configuration: for most Drupal 6 sites.
- ################################################################
- #include apps/drupal/drupal6.conf;
- #################################################################
- ### Configuration for Drupal 6 sites that use boost.
- #################################################################
- include apps/drupal/drupal_boost6.conf;
- #################################################################
- ### Configuration for updating the site via update.php and running
- ### cron externally. If you don't use drush for running cron use
- ### the configuration below.
- #################################################################
- #include apps/drupal/drupal_cron_update.conf;
- #################################################################
- ### Support for upload progress bar. Configurations differ for
- ### Drupal 6 and Drupal 7.
- #################################################################
- ## This is for Drupal 6. Comment out the line above and uncomment
- ## the line below if you're on Drupla 6.
- #include /etc/nginx/apps/drupal/drupal6_upload_progress.conf;
- ## Including the php-fpm status and ping pages config.
- ## Uncomment to enable if you're running php-fpm.
- #include /etc/nginx/php_fpm_status_vhost.conf;
- ## Including the Nginx stub status page for having stats about
- ## Nginx activity: http://wiki.nginx.org/HttpStubStatusModule.
- #include /etc/nginx/nginx_status_vhost.conf;
- } # HTTP server
Advertisement
Add Comment
Please, Sign In to add comment