0

I have setup port forwarding on my router, Disabled my firewall, tried many different things in nginx.conf and changed stuff like the server_name, but nothing is working. I have also tried to use sites like canyouseeme.org to try and connect and use other devices. Another thing I have tried is rebooting and using a different port. My linux distro is Arch linux. Here is my nginx.conf:

#user http;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

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

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   /srv/http;
            index  index.html index.htm;
        }

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /srv/http;
        }


#EVERYTHING UNDERNEATH IS JUST OPTIONAL IN CASE I NEED TO DO SOMETHING




        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ \.php$ {
        #    root           html;
        #    fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi_params;
        #}

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }


    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}


    # HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;

    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;

    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;

    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}

}
5
  • 1
    Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Commented Apr 4 at 11:46
  • Can you connect to your router, or is the router connect ok but the web server connect down? What router do you have, and who’s your internet provider? Where do you get your public IP? Commented Apr 4 at 11:54
  • Also you need to check whether you have CG-NAT, in which case you can't do what you want. Commented Apr 4 at 23:19
  • @ReflectYourCharacter My ISP is vodafone, I have port forwarded port 80, 443 and 25565 for minecraft and it works on my windows OS, the minecraft server also doesn't work here for the public ip. I got my public ip from many places all showing the same result such as locallhost.com and whatismyip.com. I can connect to my router, my router is a vodafone wifi hub, and I can connect with localhost. As I said before on my windows machine the minecraft server worked which it does not on my arch linux. And the firewall is not the issue. Commented Apr 5 at 0:12
  • @ChanganAuto I do not have CG-NAT. Commented Apr 5 at 0:17

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.