Domain Names and directory configuration

angelox nginx-forum at
Tue Nov 25 02:08:08 UTC 2014

I'm starting out with nginx and I'm stumbling at something I thought simple,
but that I haven't been able to figure out, yet.

I need to map three domain names, each one to its own subdirectory under the
document root directory (/usr/share/nginx/html/) on a shared host:

domain1 ---> ../html/blog
domain2 ---> ../html/wiki
domain3 ---> ../html/forum

If this is feasible, and I'd guess it is, then I'm not sure how to begin
setting up locations that will serve requests from those subdirectories. 

In all cases, when trying something like, nginx invariably
maps to the root directory. Typing, for example, works
just fine. I know I must be missing some essential info on how to configure
nginx for this type of thing, and any hint or direction would be


Posted at Nginx Forum:,255083,255083#msg-255083

More information about the nginx mailing list