Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
wiki.nginx.org/VirtualHostExample –  quanta Oct 13 '11 at 2:07

1 Answer 1

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/;
}
share|improve this answer

Your Answer

 
discard

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.