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!
Verify if the CentOS7 firewall is blocking the http traffic:
If you don't see
http
inservices:
, or80/tcp
inports:
then you need to add ahttp
service to your zone:After that reload your firewall to get access to your new service:
And verify that
http
is opened: