Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am doing this as a test for bigger deployment. I have Apache running on CentOS5 in a clean VM (just a few tools installed, PHP and such).

If mod_ssl is set to listen on 443 in /etc/httpd/conf.d/ssl.conf the the site at https://192.168.1.137 loads just fine.

If I change the listen port to eg. 9443 in ssl.conf and reload httpd the page wont load at https://192.168.1.137:9443 - I set the eth0 to be trusted and disabled SElinux in case that was interfering but still no luck.

Am I missing something?

share|improve this question
    
I imagine you need to restart httpd when changing the listening port, rather than just reloading it, but perhaps that's what you meant. –  Marty Aug 20 '11 at 4:07
    
Sorry when I wrote reload I meant restart by command 'service httpd restart' –  Lukasz Aug 21 '11 at 5:21

2 Answers 2

up vote 2 down vote accepted

Make sure you change all references to 443 in you apache configuration. The ssh server is often configured as a virtualhost. You wlll need to change the port it is using as well as changing the listen port. You may need a virtualhost configuration something like (you should adjust for your needs:

<VirtualHost _default_:9443>
    SSLEngine on
    SSLCertificateFile /etc/pki/tls/certs/localhost.crt
    SSLCertificateKeyFile /etc/pki/tls/private/localhost.key

    CustomLog /var/logs/apache/access_ssl.log combined
    ErrorLog /var/logs/apache/error_ssl.log
    LogLevel warn
 </VirtualHost>

Use sudo netstat -lnp | grep 443 to see if Apache is listening no the desired port. This version of the command will also list the listening program. To see which ports apache is listening on try the command sudo netstat -lnp | grep apache.

share|improve this answer
    
I checked all Apache configuration files for number 443 but I cant find anything else. Most of the tutorials I found just say change the listen entry in ssl.conf. –  Lukasz Aug 21 '11 at 5:20
    
I have edited the response to provide additional information. –  BillThor Aug 21 '11 at 7:13
    
Thanks Bill, I changed the VirtualHost default port to 9443. Also I have ServerName <hostname>:9443 inside VirtualHost section. Thanks for your help. –  Lukasz Aug 23 '11 at 21:31

When disabling SE linux did you also make sure to change the FW settings? Last time I checked disabling SELinux did not disable the firewall under centos. so maybe the firewall still has 443 open and not 9443

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.