Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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>
<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
</Directory>

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

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 127.0.0.0/255.0.0.0 ::1/128
</Directory>

SSLEngine on

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

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

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

1 Answer 1

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

 
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.