<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Getting rid of &amp;quot;Welcome to nginx&amp;quot;</title>
<description>Hi guys,

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 &amp;quot;Welcome to nginx!&amp;quot; page and not my index.php file.

What am I doing wrong? Here's my nginx config:

server {

listen 80 default; 
root /var/www/public_html;
index index.php index.html index.htm;
server_name _;

location / {
try_files $uri $uri/ /index.html;
}

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
}</description><link>http://forum.nginx.org/read.php?2,213878,213878#msg-213878</link><lastBuildDate>Sun, 19 May 2013 23:29:10 -0400</lastBuildDate>
<generator>Phorum 5.2.16</generator>
<item>
<guid>http://forum.nginx.org/read.php?2,213878,213914#msg-213914</guid>
<title>Re: Getting rid of &quot;Welcome to nginx&quot;</title><link>http://forum.nginx.org/read.php?2,213878,213914#msg-213914</link><description><![CDATA[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 :)]]></description>
<dc:creator>Joakim</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Wed, 17 Aug 2011 08:46:45 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,213878,213886#msg-213886</guid>
<title>Re: Getting rid of &quot;Welcome to nginx&quot;</title><link>http://forum.nginx.org/read.php?2,213878,213886#msg-213886</link><description><![CDATA[On Wed, Aug 17, 2011 at 1:37 AM, Joakim &lt;nginx-forum@nginx.us&gt; wrote:<br />&gt; Hi guys,<br />&gt;<br />&gt; I've just setup nginx on my Ubuntu staging machine. Entering<br />&gt; http://192.168.1.1/index.php works like a charm and loads the index.php<br />&gt; file i've put in the /var/www/public_html folder. http://192.168.1.1<br />&gt; however instead shows the &quot;Welcome to nginx!&quot; page and not my index.php<br />&gt; file.<br />&gt;<br />&gt; What am I doing wrong? Here's my nginx config:<br />&gt;<br /><br />have you tried clearing your browser's cache?<br /><br />_______________________________________________<br />nginx mailing list<br />nginx@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx]]></description>
<dc:creator>Edho Arief</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Tue, 16 Aug 2011 16:50:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,213878,213884#msg-213884</guid>
<title>Re: Getting rid of &quot;Welcome to nginx&quot;</title><link>http://forum.nginx.org/read.php?2,213878,213884#msg-213884</link><description><![CDATA[Hi Mathias,<br /><br />Thanks for your answer. That won't do it unfortunately. Also tried moving the &quot;try_files&quot; param out of the &quot;location /&quot; bracket - no luck with that either.<br /><br />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 &quot;/etc/nginx/sites-available/local&quot; and made a symlink to it in &quot;etc/nginx/sites-enabled&quot;.<br /><br />I then restarted Nginx. I've messed around with the settings in my &quot;local&quot; 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...]]></description>
<dc:creator>Joakim</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Tue, 16 Aug 2011 16:13:25 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,213878,213883#msg-213883</guid>
<title>Re: Getting rid of &quot;Welcome to nginx&quot;</title><link>http://forum.nginx.org/read.php?2,213878,213883#msg-213883</link><description><![CDATA[Hi Joakim,<br /><br />Your issue seems quite simple: You should use &quot;try_files $uri $uri/ /index.php&quot;, otherwise the .html version is shown.<br /><br />Regards,<br />Mathias Teugels]]></description>
<dc:creator>Mathias Teugels</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Tue, 16 Aug 2011 15:43:09 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,213878,213878#msg-213878</guid>
<title>Getting rid of &quot;Welcome to nginx&quot;</title><link>http://forum.nginx.org/read.php?2,213878,213878#msg-213878</link><description><![CDATA[Hi guys,<br /><br />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 &quot;Welcome to nginx!&quot; page and not my index.php file.<br /><br />What am I doing wrong? Here's my nginx config:<br /><br />server {<br /><br />listen 80 default;<br />root /var/www/public_html;<br />index index.php index.html index.htm;<br />server_name _;<br /><br />location / {<br />try_files $uri $uri/ /index.html;<br />}<br /><br />location ~ \.php$ {<br />fastcgi_pass 127.0.0.1:9000;<br />fastcgi_index index.php;<br />include fastcgi_params;<br />}<br />}]]></description>
<dc:creator>Joakim</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Tue, 16 Aug 2011 14:37:45 -0400</pubDate></item>
</channel>
</rss>