Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 trying to get my SSL certificate to work with apache2 on ubuntu.

Chrome gives me just the error: Error 102 (net::ERR_CONNECTION_REFUSED):

On this config: ServerAdmin webmaster@localhost

DocumentRoot /var/www
<Directory />
    Options FollowSymLinks
    AllowOverride None
<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from ::1/128

SSLEngine on

SSLCertificateFile /etc/apache2/ssl/swenet_info.crt
SSLCertificateKeyFile /etc/apache2/ssl/swenet_info.key  

<FilesMatch "\.(cgi|shtml|phtml|php)$">
    SSLOptions +StdEnvVars
<Directory /usr/lib/cgi-bin>
    SSLOptions +StdEnvVars

BrowserMatch "MSIE [2-6]" \
    nokeepalive ssl-unclean-shutdown \
    downgrade-1.0 force-response-1.0
# MSIE 7 and newer should be able to use keepalive
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown

How can i fix it?

share|improve this question
add a netstat -tlupn output. – Mike Feb 4 '13 at 7:55
also providing apache2ctl -S would tell us what apache configuration is – mateusz.kijowski Feb 4 '13 at 9:06

Connection refused suggests that either Apache is not listening on port 443 or there is a firewall rejecting your connection on the apache host or somewhere in between.

If apache is not listening for connections (you can check it with netstat -ntpl | grep :443) you should add an appropriate Listen directive to your configuration, such as

Listen 443
share|improve this answer

Your Answer


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.