Newbie config not catching virtual host.

Nuno Magalhães nunomagalhaes at eu.ipp.pt
Fri Feb 27 04:27:20 MSK 2009


Greetings,

I've just set up a domain name and i can't get nginx to parse to the
correct subfolder. I think this is related to fastcgi, caused by an
error between my chair and keyboard.

I have  /var/www/nginx-default/ with a default page; and i have a
subfolder with a site, so /var/www/nginx-default/subfolder/

- What i want:
If a user enters: http://my-cool-domain.com
s/he should get: /var/www/nginx-default/subfolder/
which would become: /var/www/nginx-default/subfolder/index.php
(preferably without showing the filename in the adress bar)

- What i have:
If i enter http://my-cool-domain.com i get the default page at
wwwroot, no css or images;
if i enter http://my-cool-domain.com/subfolder i get the 404 error page;
if i enter http://my-cool-domain.com/subfolder/index.php i get the
page i want, php-parsed, no css or images.
This is the same if i use the IP adress instead (only much faster),
although browser-caching had me confused for a while...

This is my config:

/etc/nginx/nginx.conf  http://pastebin.com/m618b1c46
/etc/nginx/fastcgi_params http://pastebin.com/m4a40a295
/etc/nginx/sites-enabled/default http://pastebin.com/m111dd757

I'm sure there are things i could replace with variables, set up a
default catch all, etc, but i'd take one step at a time...
This is probaby a missing coma or something, any help would be appreciated.

Nuno Magalhães
LU#484677





More information about the nginx mailing list