Ssl – How to get Apache to serve SSL Bugzilla CGI from a subpage (NOT subdomain)

apache-2.2bugzillacgi-binmod-rewritessl

I'm trying to set up Bugzilla with SSL to be served by Apache from

https://www.foo.com/bugzilla

since I don't want to pay for an extra SSL cert to get a subdomain for bugzilla.

What is the best approach for this? Should I use mod_rewrite? There is normal PHP content being served on the other pages and I'm not sure how to direct just that one /bugzilla subdirectory to the Bugzilla installation directory.

Is editing the default-ssl conf file enough? Do I need to create another conf file? Right now https://www.foo.com/bugzilla gives a 404.

Mon Jan 16 10:10:25 [root@ /]# ll /var/www/bugzilla
total 1320
drwxr-x--- 16 root www-data   4096 Jan 15 21:15 ./
drwxrwsr-x 12 root staff      4096 Jan 15 12:41 ../
-rwxr-x---  1 root www-data   1664 Dec 28 18:49 admin.cgi*
-rwxr-x---  1 root www-data  30977 Dec 28 18:49 attachment.cgi*
-rwxr-x---  1 root www-data  47891 Dec 28 18:49 buglist.cgi*
drwxr-x--- 16 root www-data   4096 Jan 15 16:03 Bugzilla/
-rw-r-----  1 root www-data   3414 Dec 28 18:49 bugzilla.dtd
-rw-r-----  1 root www-data  28263 Dec 28 18:49 Bugzilla.pm
drwx------  5 root www-data   4096 Dec 28 18:49 .bzr/

/etc/apache2/sites-available/default-ssl :

<IfModule mod_ssl.c>
<VirtualHost _default_:443>
  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>

  <Directory /var/www/bugzilla/>
    AddHandler cgi-script .cgi
    Options +Indexes +ExecCGI +FollowSymLinks
    DirectoryIndex index.cgi
    AllowOverride Limit FileInfo Indexes
    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>

Best Answer

It looks like you didn't extract / move all the Bugzilla files. You are missing index.cgi and a whole set of other files.

There is nothing special you need to do. The quick start guide explicitly says installing it under a directory is supported:

1. Decide from which URL and directory under your webserver root you
   will be serving the Bugzilla webpages.
Related Topic