Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

No access to nginx server from www

$
0
0
I installed a LEMP server on an odroid c2 (LEMP=Nginx, mariadb, phpmyadmin, php-fpm et wordpress).
Eveything is woking in my home local network but i cannot access server from outside my local network.
To have access to the server from the www, having a classical internet box routed, I've assigned a fixed ip to the server (192.168.0.xx) and redirected port 80 for this ip in tcp.
I also took a free domain name for the public IP of my freebox.(IP xxx.xxx.xxx.xxx -> my-site.ocry.com).

This domain name is well registered and active in the parameters of my internet box provider (Reverse DNS custom).
When I test from the www url site (www.domain name or public IP port 80) it fails and I have a page: "This site is inaccessible, 127.0.0.1 took too long to answer".
it's been 4 days that I can not find a solution; thanks for any help;

I went to https://ping.eu/,
a DNS lookup on the domain name refers to the public IP of my BOX.
a PING is successful
a port check tells me that port 80 and 8080 are open.

here is my server config in /etc/sites-available/my-site


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

server_name my-site.ocry.com;
root /var/www/my-site;

index index.php index.html;

location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
fastcgi_read_timeout 600;
}
}

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>