Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have worked with and setup Apache before, but never nginx. Could anyone point me to a good guide that describes how to setup and run nginx for multiple website (vhosts, I suppose) support.

I want to have different websites with different home directories (~/, ~/, etc) running on nginx.

share|improve this question – quanta Oct 13 '11 at 2:07
up vote 0 down vote accepted

The debian way is to have a file for each virtualhost in /etc/nginx/sites-available, then symlinks to those in /etc/nginx/sites-enabled; then for each site, something like this:

server {
    listen   80;
    access_log  /var/log/nginx/;
    root /home/shish/;
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.