Hi, I am attempting to stand up a new server Red Hat EL6 with Bugzilla-4.0 and everything is working expect Virtual Host. By defualt Bugzilla looks for SetEnv PROJECT (variable) in the /etc/httpd/conf/httpd.conf file. I followed the given instructions to place SetEnv PROJECT (variable) under <VirtualHost> however bugzilla doesn't recognize that it is there. When I put SetEnv PROJECT outside of <VirtualHost> then it becomes the default for ALL my different virtual host instead of using what is inside the <VirtualHost> section.
Here is the NameVirtualHost section of my httpd.conf file
NameVirtualHost *:443
SetEnv PROJECT UIDPMO
<VirtualHost 140.188.65.31:443>
SetEnv PROJECT UIDPMO
ServerAdmin
ronald.hunt@ngc.com
ServerName uidsupport.vad.ws-gex.com
Alias /UIDPMO /etc/bugzilla-4.0
SSLEngine on
SSLCertificateFile /etc/pki/CA/certs/uidsupport.crt
SSLCertificateKeyFile /etc/pki/CA/private/uidsupport.key
SSLCACertificateFile /etc/ssl/certs/ca-bundle.crt
DocumentRoot /etc/bugzilla-4.0/
<Directory /etc/bugzilla-4.0/>
Options FollowSymLinks MultiViews ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit FileInfo Indexes
AddHandler cgi-script .cgi
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
# using the default error log above
ServerSignature On
# See
http://www.google.com/search?q=MSIE+...de-1.0&spell=1
# MS IE Bug with SSL
# SetEnvIf User-Agent ".*MSIE.*" \
# nokeepalive ssl-unclean-shutdown \
# downgrade-1.0 force-response-1.0
</VirtualHost>
<VirtualHost 140.188.65.32:445>
ServerName pdssupport.vad.ws-gex.com
SetEnv PROJECT PDS
Alias /PDS /etc/bugzilla-4.0
</VirtualHost>
If anyone can help that would be greatly appreciated.
Thank you in advance
PS: Here is what Bugzilla 4.0.1 guide says to do:
2.4. Multiple Bugzilla databases with a single installation
The previous instructions referred to a standard installation, with one unique Bugzilla database. However, you may want to host several distinct installations, without having several copies of the code. This is possible by using the PROJECT environment variable. When accessed, Bugzilla checks for the existence of this variable, and if present, uses its value to check for an alternative configuration file named localconfig.<PROJECT> in the same location as the default one (localconfig). It also checks for customized templates in a directory named <PROJECT> in the same location as the default one (template/<langcode>). By default this is template/en/default so PROJECT's templates would be located at template/en/PROJECT.
To set up an alternate installation, just export PROJECT=foo before running checksetup.pl for the first time. It will result in a file called localconfig.foo instead of localconfig. Edit this file as described above, with reference to a new database, and re-run checksetup.pl to populate it. That's all.
Now you have to configure the web server to pass this environment variable when accessed via an alternate URL, such as virtual host for instance. The following is an example of how you could do it in Apache, other Webservers may differ. <VirtualHost 212.85.153.228:80>
ServerName foo.bar.baz
SetEnv PROJECT foo
Alias /bugzilla /var/www/bugzilla
</VirtualHost>
Don't forget to also export this variable before accessing Bugzilla by other means, such as cron tasks for instance.
UPDATE: Resolved
For anyone that fell into the same trap as I did. The Bugzilla guide neglects to tell you where to set the SetEnv PROJECT variable. It turns out that you need to add this variable in the /etc/httpd/conf.d/ssl.conf file under each virtual host section. So for me I did the follwoing
<VirtualHost_default_443>
SetEnv PROJECT PDS
Save the file, restarted Apache and everything worked as expected. Although I did include the NameVirtualHost section in /etc/httpd/conf/httpd.conf I don't think it made a difference.