Skip to content

Instantly share code, notes, and snippets.

@cmejo
Created October 27, 2014 13:01
Show Gist options
  • Select an option

  • Save cmejo/99e25dfacc99103dd1c2 to your computer and use it in GitHub Desktop.

Select an option

Save cmejo/99e25dfacc99103dd1c2 to your computer and use it in GitHub Desktop.

Revisions

  1. cmejo created this gist Oct 27, 2014.
    21 changes: 21 additions & 0 deletions drupal nginx "vhost"
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    # drupal 7 nginx vhost configuration

    server {
    server_name boncera.com; # change obviously
    rewrite ^ http://www.boncera.com$request_uri? permanent; # this makes it so whether the user types in www or non-www it redirects always to www and is SEO approved
    }

    server {
    listen 80;
    server_name www.boncera.com; # change the domain name obviously
    root /var/www/boncera.com/www; # httpdocs/docroot change for your file structure
    index index.php;

    #setup logging
    access_log /var/www/boncera.com/logs/access.log; # change based on file structure
    error_log /var/www/boncera.com/logs/error.log; # change based on file structure
    rewrite_log on;

    include template;
    #include drupal_mc; commented out for the moment; this is an optimization/speed config
    }