I’ve just setup nginx on my Ubuntu staging machine. Entering http://192.168.1.1/index.php works like a charm and loads the index.php
file i’ve put in the /var/www/public_html folder. http://192.168.1.1
however instead shows the “Welcome to nginx!” page and not my index.php
file.
Thanks for your answer. That won’t do it unfortunately. Also tried
moving the “try_files” param out of the “location /” bracket - no luck
with that either.
What I did when setting up Nginx was following the instructions in the
/etc/nginx/sites-available/default config file. So I created my new file
containing the above config in “/etc/nginx/sites-available/local” and
made a symlink to it in “etc/nginx/sites-enabled”.
I then restarted Nginx. I’ve messed around with the settings in my
“local” file and seen PHP stopped working completely, so I know that
Nginx actually are loading my config, but just ignore to call my
index.php when the URL ends with / or /index.php…
I’ve just setup nginx on my Ubuntu staging machine. Entering http://192.168.1.1/index.php works like a charm and loads the index.php
file i’ve put in the /var/www/public_html folder. http://192.168.1.1
however instead shows the “Welcome to nginx!” page and not my index.php
file.
Thanks Edho! That did it. I tried cleaning the cache when I first saw
the error, but as I tried different settings I forgot to clean again.
Never thought it were that simple
Posted at Nginx Forum:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.