Git Product home page Git Product logo

nginx_drupal's Introduction

yhager's nginx Drupal config:

  This is a complete nginx configuration for Drupal[1] sites. It
  supports boost, images server and multiple sites. Configuration of
  generic components is encapsulated, so you only need to define the
  required stuff, like domain name, web root directory etc.

  This is a complete nginx configuration that is meant to serve as a
  basis for your setup.

  [1] http://drupal.org


Features:

  * Drupal with clean URL's (of course!)
  
  * Multisite - to add a site, just create a short config file and
    reload

  * Multiple environments - like staging, development and production
    are possible (see example config file)
  
  * Images server for static files and imagecache manipulation (You
    would want to override theme_imagecache for this).
  
  * Boost[2] supported - if boost files exist they are used (Boost 5.x
    files scheme)

  * Gzipped static files are served if they exist (see tne javascript
    aggregator module[3]).

  * Only allows to run the required PHP files (index.php,
    cron.php). The rest require a htpasswd. This provides a level of
    protection that is missing from most Drupal installations.

  * Large fastcgi timeout - to allow long opeartions to run on PHP,
    until PHP times out.

  * Use http://localhost/nginx_status to monitor server health, with
    tools like munin.
 
  [2] http://drupal.org/project/boost
  [3] http://drupal.org/project/javascript_aggregator


Note:

  These same settings and instructions would also work for mediawiki
  based wiki site. It can be extended to support more platforms (like
  wordpress). 


Installation: 

  # clone
  git clone git://github.com/yhager/nginx_drupal

  # point nginx conf file to nginx.conf 
  vi /etc/init.d/nginx     # your distro might have different location

  # restart nginx (distro dependant)
  /etc/init.d/nginx restart

  # make sure you have a php-cgi server running on port 3000
  php-cgi -b 127.0.0.1:3000

  # create a config file for your site
  cp conf/vhosts.d/{example,yoursite}.conf
  vi conf/vhosts.d/yoursite.conf 

  # edit conf/production, conf/staging and conf/dev to point to the directory of each env.
  vi conf/{production,staging,dev}


  * Running update.php and other protected PHP files

    The supplied htaccess uses the user 'user' and the password
    'secret'. Be sure to change that using the 'htpasswd' command:

    htpasswd -c -b conf/htpasswd user secret


  * Adding another site

    # Copy conf/example.conf and edit it
    cp conf/vhosts.d/{example,anothersite}.conf
    vi conf/vhosts.d/anothersite.conf

    # reload nginx
    /etc/init.d/nginx reload


Troubleshooting:

  If you get an error about gzip_static line, either comment it out
  (and lose the automatic .gz files match) or recompile nginx with the
  '--with-http_gzip_static_module' configuration option.

  If you get an error about stub_status module missing, comment those
  lines out, or recompile nginx with '--with-http_stub_status_module'
  configuration option.


Contribution:

  Fork this project on GitHub and send pull requests.


Bugs, Features, Issues:

  File a report on the issue tracker:
  http://github.com/yhager/nginx_drupal/issues/


Questions:

  Send me an e-mail (see LICENSE for my address).

nginx_drupal's People

Contributors

yhager avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

nginx_drupal's Issues

install.php is called

When I try to access my websites with this configuration, the browser is redirected to the install.php page. How can I change this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.