1

I can't figure out why I can't connect to my VPS.

httpd.conf: i added:

Listen 80
listen 443

NameVirtualHost *:80
NameVirtualHost *:443

 <VirtualHost *:80>
    SSLEngine off
    ServerAdmin webmaster@example.com
    DocumentRoot somepath
    ServerName somedomain
    ErrorLog something
    CustomLog something common
 </VirtualHost>

 <VirtualHost *:443>
    ServerAdmin webmaster@example.com
    DocumentRoot somepath
    ServerName somedomain
    ErrorLog something
    CustomLog something common

    SSLEngine on
    SSLProtocol -all +SSLv2
    SSLCipherSuite SSLv2:+HIGH:+MEDIUM:+LOW:+EXP
    SSLCertificateFile something
    SSLCertificateKeyFile something
    SSLCertificateChainFile something
    SSLCertificateChainFile something
 </VirtualHost>

mod_ssl is installed

There seem to be no syntax errors:

/usr/sbin/httpd -t
Syntax OK

The DocumentRoot path is right, because it worked when I just used port 80/ had not added anything to try to make port 443 work.

Yet it's not working (neither with http:// nor https://) ... Did I overlook something?

  • 1
    What is not working? – Michael Hampton Mar 8 '14 at 18:00
  • I can't access the server through the domain name (the browser tells me it can't access the server) – Waterlilly Mar 8 '14 at 18:21
  • 1
    Have you checked that the domain name exists correctly in DNS? Have you checked with netstat -lnp that Apache is listening to ports 443 / 40? – Tero Kilkanen Mar 8 '14 at 18:32
  • 1
    What is the exact error message that the browser gives you ? – Iain Mar 8 '14 at 18:41
  • it probably gives you a warning when you restart httpd/apache service, no? I believe the warning will tell you, you cannot have both 443 and 80 assigned to virtual hosts. That warning/error is correct. Listen to it. – SnakeDoc Mar 8 '14 at 22:54

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.