0
votes

I have a clean install of Linux CentOS on VMWare. Ports 80 and 443 are open in my router. To limit the possible issues, I have temporarily disabled SELinux, and I have stopped the iptables service.

I have followed the directions in the article on setting up an SSL secured Webserver with CentOS: https://wiki.centos.org/HowTos/Https.

Following are the only changes I have made to the default ssl.conf file:

  • Changes Server name to list my server name
  • Revised SSLCertificateFile with the name of my .crt file
  • Revised SSLCertificateKeyFile with the name of my .key file

.

<VirtualHost _default_:443>
 ServerName www.example.com
 SSLCertificateFile /etc/pki/tls/certs/example.crt
 SSLCertificateKeyFile /etc/pki/tls/private/example.key
</VirtualHost>

Using any computer in my LAN, I am able to get both HTTP(80) and HTTPS(443) Web pages from my HTTPD Web server. When using a computer on a different network, I can get HTTP(80) pages. However, HTTPS(443) pages produce "error 404 the requested resource is not found."

enter image description here

Getting an HTTP(80) page using a computer in a different network, I see connections in this log:

  • /var/log/httpd/access_log

Requesting an HTTPS(443) page using a computer in a different network, these logs do not contain any new events:

  • /var/log/httpd/access_log
  • /var/log/httpd/error_log
  • /var/log/httpd/ssl_request_log
  • /var/log/httpd/ssl_access_log

A Wireshark capture on the client does not show any relevant HTTP(80), HTTPS(443) or SSL packets.

Since the logs are not showing events when requesting HTTPS(443) Web pages, and Wireshark is also not capturing packets, I am not certain where to turn next to diagnose this issue. If there are any tips or suggestions on a way to diagnose the issue, I would definitely be appreciative.

1
Do you have a default homepage? I've seen similar when I haven't added an 'index.html' to the site. Failing any other solutions, an alternative to the setup instructions can be found at howtoforge.commcalex
@mcalex, thank you very much for the reminder to ensure that /var/www/html contains the file index.html. I do have the index.html file. Thank you also very very much to the howtoforce.com page on the perfect CentOS server. Wow, what a great resource. I will step through the howtoforge page to see if I can find a tip to solve the issue I am facing. I really appreciate the tips here!JeremyCanfield

1 Answers

0
votes

I was able to solve this issue. The directions in this article provided the fix: https://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-httpd-secure-server.html.

Originally, my ssl.conf file did not have www or .com in the domain name, like this:

<VirtualHost _default_:443>
 ServerName www.example.com
 SSLCertificateFile /etc/pki/tls/certs/example.crt
 SSLCertificateKeyFile /etc/pki/tls/private/example.key
</VirtualHost>

I noticed in the CentOS documentation that www and .com was being used. I created a new certificate and private key, and then updated the ssl.conf file.

<VirtualHost _default_:443>
 ServerName www.example.com
 SSLCertificateFile /etc/pki/tls/certs/www.example.com.crt
 SSLCertificateKeyFile /etc/pki/tls/private/www.example.com.key
</VirtualHost>

Now I am no longer getting error 404 when requesting the Web page on a remote network. This taught me that there are specific requirements in the format of the certificate, private key, and ssl.conf file.