Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm developing a small website (Magento eshop) on own Debian virtual server. I'm not very advanced in this topic. Server now works fine, the last remaining problem is SSL access via https protocol.

When I access the server via local IP address, it works. But when I access it via, is server unavailable. However http:/ / and http:/ / works well.

What can be the problem?

My config files:


NameVirtualHost *:80
Listen 80

<IfModule mod_ssl.c>
    Listen 443

<IfModule mod_gnutls.c>
    Listen 443


    DocumentRoot /var/www/magento
    <Directory /var/www/magento/>
        Options FollowSymLinks
        AllowOverride All
    ErrorLog /var/log/apache2/error.log
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn
    CustomLog /var/log/apache2/access.log combined


NameVirtualHost *:443
<VirtualHost *:443>
    ServerAlias *
    SSLEngine On
    SSLCertificateFile /etc/apache2/ssl/edc.pem
    DocumentRoot /var/www/magento
    <Directory /var/www/magento>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
    LogLevel warn
    ErrorLog /var/log/apache2/ssl-error.log
    CustomLog /var/log/apache2/ssl-access.log combined
share|improve this question

migrated from Oct 10 '12 at 3:42

This question came from our site for professional and enthusiast programmers.

To help diagnose, let me ask a few questions.

  1. When you said "server unavailable":

    • what is the exact error message on the browser?
    • try running openssl s_client -connect (if you're not on a unix box, try it on your vps itself)
    • do you get anything in /var/log/apache2/ssl-access.log or /var/log/apache2/ssl-error.log?
  2. When you said it works with

    • I presume you would at least get a browser warning saying certificate name mismatch.
    • is the browser displaying the correct certificate when you click on the lock icon?

Other things to check:

  • make sure you have no proxy configured in the https case
  • does /etc/apache2/ssl/edc.pem contain both your cert and private key as well?
share|improve this answer

Wil Tan: Thanks for response.

  1. a) "Classic" Firefox error message - Unable to connect: Firefox can't establish a connection to the server

  2. b) result of this command: connect: Connection refused connect:errno=29

  3. c) both these log files are empty - isn't it strange?

  4. Yes, the browser shows warning about this certifica, because it's self-trusted one. That's OK, self-trusted certificate is enought for me

make sure you have no proxy configured in the https case

Yes, there's no proxy for https

does /etc/apache2/ssl/edc.pem contain both your cert and private key as well?

I tried new way to make the certificate - So now I have,, and files.

New magento_ssl content (the changed part):

SSLEngine On
SSLCertificateKeyFile ssl/
SSLCertificateFile ssl/

Best regards


share|improve this answer

This is a general screen which goes from in to out of your local unit.

Check your Security Configurations for Policy Kits and possible Firewall Restrictions for addresses outside the intranet or local network. Local resolution policies can override hosting connections in any OS.

Check your local gateway to check the Security exception over port 433 and HTTPS and see that the traffic is being correctly negotiated. Unless you are doing localhost only development; you may need to check the route of the request, seeing if it isn't being resolved over your DHCP gateway. (Router...)

Check for file logs after connections are made, see if there are any other bits you are or are not seeing. (for instance, client results in error; host did not see client because of namespace resolution difficulties)

Check your VHosts connection, check if the directory permissions and log permissions are equally accessible and or secure for (Deny, Allow...) either connections, they seem to be the most different. Maybe try using a literal name for your NameVirtualHost.

Check to be sure that connections like a local mobile phone or alternate computer (not one running the virtual machines) can see the website. This sometimes occurs with VMWare, Citrix and or other network adapters.

(Other possible conflictions: Are there any other SSL servers running, are there any FTP services which require SSL connections which are overriding your connection?)

share|improve this answer

Your Answer


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