0

nginx gives 404

Andrea Amorosi 9 years ago 0

Hi there, here's my situation:


I've got 1 domain example.com and 3 websites php1 (is in /srv/php1 port 80), php2 (is in /srv/php2 port 81) and node3 (is in /srv/node3 port 82), what I'm trying to do is to have:

php1 as default so when I go to example.com the first one is loaded

example.com/php2 should go to php2

example.com/node3 should go to node3


I'm not sure what I'm missing but I've spent the last 6 hours trying to figure it out editing the custom configuration for each one, I'm also not sure if I should use different ports for each one of them. At the moment if I go to example.com I get php1 as the Default option is selected and is running on port 80 (I guess). I tried different snippet I found here and on the internet trying to set up custom settings for the location, root and alias but while if I go to example.com/php2 or example.com/node3 I always get 403 or 404 depending on what is written on the custom fields. I should probably mention that if I go to example.com:81 and example.com:82 I get the correct pages.


thanks in advance