0

I'm running a fresh Debian 9 / nginx 1.10 install. The new host (poseidon) is declared in my DNS.

I've setup a very generic NGINX configuration

server {
        listen 80 default_server;
        listen [::]:80 default_server;

        root /home/www/mysite/;
        index index.php index.html;

        location / {
                try_files $uri $uri/ =404;
        }

        location ~ \.php$ {
                try_files $uri $uri/ =404;
                fastcgi_pass unix:/run/php/php7.0-fpm.sock;
                fastcgi_param SCRIPT_FILENAME 
 document_root$fastcgi_script_name;
                fastcgi_index index.php;
                include /etc/nginx/fastcgi_params;
        }
}

in /home/www/mysite I've an index.php script to test access that's actually the basic php info

<?php
phpinfo();
?>

in my browser it works fine using http://poseidon or it's local IP address but when trying to access from outside with my external domain name http://www.open-si.org or http://open-si.org I face a HTTP 403 error.

So I presume that the port forwarding on my isp router is correct as the request is received by the http server (no site not found or http 404 error) but it fails with a Http 403 error.

switching nging logging to debug it appears that this error may be due to a time-out

client timed out (110: Connection timed out) while waiting for request, client: 192.168.1.3, server: 0.0.0.0:80

I googled and found many similar problems but no answer. Thinking about a php-fpm configuration problem linked to a time-out setting, I put a basic html page in the web root folder adding index index.html index.php in the Nginx server block.

same problem ! so php-fpm seems not to be on the critical path.

Any idea ?

Emmanuel BRUNET
  • 1,286
  • 3
  • 19
  • 46
  • Do you have logs for nginx saying that the request was received? – Shawn C. Feb 25 '18 at 15:41
  • only when it succeed in access.log 192.168.1.3 - - [25/Feb/2018:17:06:38 +0100] "GET / HTTP/1.1" 200 21534 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.119 Safari/537.36". but none either in access.log or error.log when receiving the HTTP 403 error – Emmanuel BRUNET Feb 25 '18 at 16:07

0 Answers0