2Answers
  • 5
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

http to https with virtual hosts

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

ssl

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.

  • 3
Reply Report
      • 2
    • Also keep in mind that older distro releases (specifically mod_ssl) did not support SNI. Which appears to be what he wants to use.

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.

  • -2
Reply Report

Trending Tags