<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Hi,</div><div class="gmail_default" style="font-family:tahoma,sans-serif">For a test, I have installed nginx 1.0.15 with php 5.3 on an Ubuntu 14.04.</div><div class="gmail_default" style="font-family:tahoma,sans-serif">The settings related to php in nginx.conf are as below where I removed the comments for simplicity.<br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"> server {<br> listen 80;<br> server_name localhost;<br> location / {<br> root /home/ubuntu/htdocs/;<br> index index.html index.htm;<br> }<br> error_page 500 502 503 504 /50x.html;<br> location = /50x.html {<br> root html;<br> }<br> location ~ \.php$ {<br> root /home/ubuntu/htdocs/public_html;<br> fastcgi_pass <a href="http://127.0.0.1:9000">127.0.0.1:9000</a>;<br> fastcgi_index index.php;<br> fastcgi_param SCRIPT_FILENAME /home/ubuntu/htdocs/public_html/$fastcgi_script_name;<br> include fastcgi_params;<br> }<br> }</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">The document root is here.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">ubuntu@fr13:~$ ls -l htdocs/<br>total 36<br>-rw-r--r-- 1 www-data www-data 1422 مارس 15 15:28 build.xml<br>drwxr-xr-x 2 www-data www-data 4096 مارس 15 15:28 classes<br>drwxr-xr-x 2 www-data www-data 4096 مارس 15 15:28 controllers<br>drwxr-xr-x 2 www-data www-data 4096 مارس 15 15:35 etc<br>drwxr-xr-x 2 www-data www-data 4096 مارس 15 15:28 includes<br>-rw-r--r-- 1 www-data www-data 152 مارس 15 15:29 index.html<br>drwxr-xr-x 2 www-data www-data 4096 مارس 15 15:28 lib<br>drwxr-xr-x 6 www-data www-data 4096 مارس 15 15:28 public_html<br>drwxr-xr-x 2 www-data www-data 4096 مارس 15 15:28 views</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">The index.html is a simple welcome message.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Also</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">ubuntu@fr13:~$ ls -l htdocs/public_html/index.php<br>-rw-r--r-- 1 www-data www-data 7556 مارس 15 15:28 htdocs/public_html/index.php</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">When I open the browser and enter localhost, I can see the welcome message. That means the basic functionality is fine.<br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">However, when I enter localhost/public_html/index.php</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">I get this message in the browser:</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">
<div class="gmail_default" style="font-family:tahoma,sans-serif">The page you are looking for is temporarily unavailable.</div><div class="gmail_default" style="font-family:tahoma,sans-serif">Please try again later.</div>
</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">At the same time, I see this entry in /usr/local/nginx/logs/error.log</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">2020/03/15 15:50:20 [error] 4808#0: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /public_html/index.php HTTP/1.1", upstream: "fastcgi://<a href="http://127.0.0.1:9000">127.0.0.1:9000</a>", host: "localhost"</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Why I get connection refused? <br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">What else should I check for more debugging?</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><font face="tahoma,sans-serif">Regards,<br>Mahmood</font><br><br><br></div></div></div></div>