Domain only reachable with port number

Posted April 24, 2020 494 views

Hi all,

This is my first topic, I cant get this out of my head and I need help with the following:

Since I started my website ( I used the NGINX config tool from digitalocean ( and filled in some information I need, my website is working fine now and is very secure.


When I was installing Grafana, it is reachable via IP:3000 and domain:3000 but not with my subdomain (for instance I have a reverse proxy set in my config like so:

server {
        listen 443;# ssl http2;
        listen [::]:443;# ssl http2;


        # SSL
        #;#ssl_certificate /etc/letsencrypt/live/;
        #;#ssl_certificate_key /etc/letsencrypt/live/;
        #;#ssl_trusted_certificate /etc/letsencrypt/live/;

        # security

        # logging
        access_log /var/log/nginx/;
        error_log /var/log/nginx/ warn;

        # reverse proxy
        location / {

        # additional config

# HTTP redirect
server {
        listen 80;
        listen [::]:80;



        location / {
                return 301$request_uri;

I have disabled ssl for now, otherwise I cannot get a LetsEncrypt Certificate.

I hope someone can help me figure this out.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers


At the moment, nothing should be working as you are returning a 301 redirect of your http://subdomain to https://subdomain however there is no SSL certificate avalable.

Additionally, what I can think of is to make sure you have your subdomain’s configuration file created as a sym-link in the /etc/nginx/sites-enabled/subdomain.conf folder.

One other thing, if this still doesn’t work, I’ll recommend checking out Nginx’s error log. It will display the exact error behind this behavior and you should be able to act upon it to resolve the issue.


Hi @KDSys,

Thanks A lot for your answer, however I have indeed a symlink to /sites-enabled.

But what I do not understand, i can reach the site at http, but only with the port number of grafana (3000). HTTPS is indeed not working due to no SSL certificate.

My goal is to get a proper redirect (reverse proxy) from IP:3000 to the domain.

  • I have a feeling that Nginx is not at all working and that’s why you can’t get to the website on port 80. To make sure it is,please SSH to your droplet and type in the following command

    netstat -tulpen | grep 80

    Let me know what the output is.

    • Hi @KDSys,

      Thanks for reaching out again.

      The outcome is:

      netstat -tulpen | grep 80
      tcp        0      0    *               LISTEN      0          116917     14679/nginx: master
      tcp6       0      0 :::80                   :::*                    LISTEN      0          116918     14679/nginx: master