Question

Cannot access my server properly

So if I try and connect to my server via IP(ipv4) it doesn’t want to connect. My domain is codeandchill.net

The issues are:

  1. Cannot connect via IP
  2. On chrome I cannot just type codeandchill.net but rather have to type https://codeandchill.net
  3. On chrome and mozzila cannot connect via www.codeandchill.net/

This is my DNS https://imgur.com/a/kXC751i

I used the Let’s Encrypt for SSL

And this is my netstat -plunta

netstat -plunta
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      710/systemd-resolve 
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      910/sshd            
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1234/master         
tcp        0    340 178.62.111.79:22        89.216.219.6:51686      ESTABLISHED 13098/sshd: root@pt 
tcp6       0      0 :::3306                 :::*                    LISTEN      1027/mysqld         
tcp6       0      0 :::80                   :::*                    LISTEN      1001/apache2        
tcp6       0      0 :::22                   :::*                    LISTEN      910/sshd            
tcp6       0      0 ::1:25                  :::*                    LISTEN      1234/master         
tcp6       0      0 :::443                  :::*                    LISTEN      1001/apache2        
tcp6       0      0 :::33060                :::*                    LISTEN      1027/mysqld         
tcp6       0  28976 178.62.111.79:443       89.216.219.6:45238      LAST_ACK    -                   
tcp6      25  90576 178.62.111.79:443       89.216.219.6:45116      CLOSE_WAIT  12960/apache2       
tcp6       0      0 178.62.111.79:443       89.216.219.6:45272      TIME_WAIT   -                   
udp        0      0 127.0.0.53:53           0.0.0.0:*                           710/systemd-resolve 

I am not too familiar with the web stuff, so basically I just want to access my page like any other, typing the codeandchill.net or www.codeandchill.net or the IP.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I would just run certbot again and tell it to add redirects.

Just type certbot and it should start it then expand certain and then add redirects to https.

If you used https when you set up the domain that would be a Homer Simpson “Doh” moment. You’ll need to edit the /etc/apache2/sites-available/{your file} (if it’s default it may be 000-default.conf) change the domain to just the domain no http or https except in the rewrite section (at the bottom of it exists). It will say RewriteEngine on Rewrite rule…etc

Then save and reload apache2

Looks like you probably already have an answer that is considerably better than my answer from mobile but I wanted to put this here just in case you didn’t.

Hi @nikolamilovic,

It seems to be that you haven’t properly configured the Apache vhost file for www.codeandchill.net and http://www.codeandchill.net/. Can you please share the vhost file for domain codeandchill.net to see what might be wrong?

If you want to troubleshoot it on your own, this article should provide some initial information that would help you out :

https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-18-04-quickstart

Regards, KFSys