Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERR_ADDRESS_UNREACHABLE when accessing my website without https

First of all, just letting you know i have a little experience with web servers and therefore, my questions might be very novice.

I am experiencing issue with my newly created website. I have a CentOS 7 server for another website and i would like to add a new website with a different URL to this server.

The configurations for the websites are, from what i understand, in /etc/httpd/conf.d.

I have created a new .conf file for my website:

    <VirtualHost *:443>

    SSLEngine on
    SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP

    #SSLCertificateFile      /etc/pki/tls/certs/localhost.crt
    #SSLCertificateKeyFile   /etc/pki/tls/private/localhost.key
    #SSLCACertificateFile    /etc/pki/tls/certs/ca-bundle.trust.crt

    SSLCertificateFile      /etc/letsencrypt/live/******/cert.pem
    SSLCertificateKeyFile   /etc/letsencrypt/live/******/privkey.pem
    #SSLCACertificateFile   /etc/letsencrypt/live/******/chain.pem
    SSLCACertificateFile    /etc/letsencrypt/live/******/fullchain.pem

    ServerName      mywebsite.com
    DocumentRoot    /var/www/myproject

    ErrorLog /var/log/httpd/ssl-mywebsite.com-error_log
    # Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
    LogLevel error
    CustomLog /var/log/httpd/ssl-mywebsite.com-access_log combined

    <Directory /var/www/myproject>
        Options -Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Order Allow,Deny
        Allow from all
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName mywebsite.com
    DocumentRoot /var/www/myproject

    <Directory /var/www/myproject>
        Options -Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog /var/log/httpd/mywebsite.com-error.log
    LogLevel warn
    CustomLog /var/log/httpd/mywebsite.com-access.log combined
</VirtualHost>

For some reason, the only VirtualHost that works is the 443 one. When i am trying to reach the website without the https:// it gives me this error:

This webpage is not available

ERR_ADDRESS_UNREACHABLE

Is there another configuration i am not aware of that disables the not-secured traffic?

If more details are needed let me know and i will provide them.

Thanks!

like image 359
shay k Avatar asked May 25 '16 09:05

shay k


People also ask

How do I fix this Err_address_unreachable?

Clear Chrome DNS Cache, Clear Browsing Data, and restart the router and device are the methods that you can use to fix ERR_ADDRESS_UNREACHABLE in Chrome. The ERR_ADDRESS_UNREACHABLE code is an error that Google Chrome returns sometimes when we try to visit certain websites.

Why is my website unreachable?

This could be because your server is down, or there is an issue with the DNS routing to your domain. Make sure that your domain is resolving correctly and try again. Before we crawled the pages of your site, we tried to check your robots. txt file to ensure we didn't crawl any pages that you had roboted out.

Why do I keep getting err address unreachable?

When users cannot visit specific websites on their computer, the error message “ERR ADDRESS UNREACHABLE” appears. If the server is overloaded, it may have returned an overloaded status to Googlebot, requesting that it crawl the site more slowly.


1 Answers

Verify if the CentOS7 firewall is blocking the http traffic:

[root@stage2 ~]# firewall-cmd --list-all
public (default, active)
  interfaces: eno16777984
  sources:
  services: dhcpv6-client https ssh
  ports: 5000/tcp
  masquerade: no
  forward-ports:
  icmp-blocks:
  rich rules:

If you don't see http in services:, or 80/tcp in ports: then you need to add a http service to your zone:

[root@stage2 ~]# firewall-cmd --permanent --zone=public --add-service=http
success

After that reload your firewall to get access to your new service:

[root@stage2 ~]# firewall-cmd --reload
success

And verify that http is opened:

[root@stage2 ~]# firewall-cmd --list-all
public (default, active)
  interfaces: eno16777984
  sources:
  services: dhcpv6-client http https ssh
  ports: 5000/tcp
  masquerade: no
  forward-ports:
  icmp-blocks:
  rich rules:
like image 133
Dusan Bajic Avatar answered Sep 28 '22 01:09

Dusan Bajic