0

I'm hosting my webserver (running Debian 8) at home and I have changed the default IP to my own and it worked.

I have since reinstalled my webserver to start from a clean slate, but it seems I have forgotten how to Google and/or configure so it will listen to my domain name. Everything works on the local network (192.168.X.X).

This site can’t be reached

domainname.nl took too long to respond.
ERR_CONNECTION_TIMED_OUT

What am I doing wrong and/or forgetting?

This is my conf of my site:

<VirtualHost *:80>
        ServerAdmin [email protected]

        ServerName domainname.nl
        ServerAlias www.domainname.nl

        Redirect permanent / https://domainname.nl/
</VirtualHost>

<VirtualHost _default_:443>
        ServerAdmin [email protected]

        ServerName domainname.nl
        ServerAlias www.domainname.nl

        DocumentRoot /var/www/domainname.nl/public_html

        ErrorLog /var/www/domainname.nl/logs/error.log
        CustomLog /var/www/domainname.nl/logs/access.log combined

        SSLEngine On
        SSLProtocol All -SSLv2 -SSLv3
        SSLCertificateFile /var/www/ssl/certificate.crt
        SSLCertificateKeyFile /var/www/ssl/certificate.key
        SSLCACertificateFile /var/www/ssl/cabundle.crt
</VirtualHost>

a2ensite domainname.nl has been executed and the 000-default.conf has had a a2dissite. Everything in the Apache2.conf is still default, and a2enmod ssl is also done.

2
  • 2
    You don't mention how you have configured your server to be visible from the internet. Have you forwarded ports or put nat rules in your router/firewall?
    – Paul
    Apr 26, 2016 at 13:26
  • That might be it, @Paul! The firewall is UFW so I've configured that to do SSH, HTTP and HTTPS. I'm going to configure the router right now, if that's the bad-guy thank you for the reminder!
    – sxbrentxs
    Apr 26, 2016 at 13:54

2 Answers 2

1

It looks like your primary NS server is not returning correct information about your domain:

ns0.nameserver.nl [xxx.xxx.xxx.xxx] returned an authoritative response in 109 ms:


Header

rcode:  Success
id: 0   opcode: Standard query
is a response:  True    authoritative:  True
recursion desired:  False   recursion avail:    False
truncated:  True
questions:  1   answers:    0
authority recs: 0   additional recs:    0
Questions

name    class   type
domainname.nl   IN  ANY
Answer records
[none]
Authority records
[none]
Additional records
[none]
-- end --

Also, check that your server is listening in the correct port/ip:

netstat -atun |grep -e 80 -e 443
1
  • netstat -atun |grep -e 80 -e 443 returns the follwoing: tcp 0 0 192.168.2.6:80 192.168.2.254:64660 SYN_RECV tcp6 0 0 :::443 :::* LISTEN tcp6 0 0 :::80 :::* LISTEN tcp6 0 0 192.168.2.6:443 192.168.2.254:64661 TIME_WAIT tcp6 0 0 192.168.2.6:443 192.168.2.254:64662 ESTABLISHED But it seems that forwarding ports in my router did the trick! Thank you nonetheless!
    – sxbrentxs
    Apr 26, 2016 at 14:04
0

I found the problem thanks to @Paul. I simply had to forward my ports in the router to the correct device. It changed addresses since it's previous install.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .