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

I'm trying to move trac to secure connection. I want to use https.

Virtual host file works fine when I put *:80 and comment out ssl engine. Whenever I change it to ssl it doesn't respond via 443.

Any ideas?

I tried this:

<VirtualHost *:443>

   ServerAdmin sandro@h.com
   ServerName trac.domain.com

   DocumentRoot /var/www/trac/repos

        SSLEngine On
        SSLCertificateFile    /etc/ssl/certs/trac.domain.com.crt
        SSLCertificateKeyFile /etc/ssl/private/trac.domain.com.key

   <Directory /var/www/trac/repos>
    Order allow,deny
    allow from all
   </Directory>

    <Location />
      AuthType Basic
      AuthName "Trac"
      AuthUserFile /etc/apache2/passwords
      Require valid-user
    </Location>

    <Location />
      SetHandler mod_python
      PythonInterpreter main_interpreter
      PythonHandler trac.web.modpython_frontend
      PythonOption TracEnvParentDir /var/www/trac
      PythonOption TracUriRoot /
    </Location>

</VirtualHost>

But when I use it, trac is inaccessible

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Make sure Apache is listening on port 443 and also make sure your firewall is allowing inbound traffic on that port.

Somewhere in your Apache config you need this,

Listen 443

On Debian (you don't mention your OS) it's in ports.conf like this,

<IfModule mod_ssl.c>
    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    Listen 443
</IfModule>

Also, don't forget you'll need to load the right module in Apache as well (how depends on your distribution).

And lastly, make sure you've opened port 443 on your firewall.

share|improve this answer
    
Also keep in mind that older distro releases (specifically mod_ssl) did not support SNI. Which appears to be what he wants to use. –  0xC0000022L May 12 '12 at 1:45
    
haha, I did forget to open port 443 on router :D thx. your firewall remark reminded me :) –  Sandro Dzneladze May 12 '12 at 5:55

First check in linux command,

# netstat -atnp | grep LISTEN

Result have to :

0.0.0.0:443

If not you must check config file.

At top config file, add:

Listen *:443

Then restart httpd.

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.