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 (~/domain1.com, ~/domain.com, etc) running on nginx.

link|improve this question
feedback

1 Answer

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;
    server_name  rav.shishnet.org;
    access_log  /var/log/nginx/rav.shishnet.org.log;
    root /home/shish/rav.shishnet.org/;
}
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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