OS: Debian 5.0.4
Server: Apache2
I've used mod_rewrite to rewrite my apache2 root (my.server.com/) to point to /var/www/drupal6/ instead of /var/www/. I also have a script installed in my cgi-bin (/usr/lib/cgi-bin) but since the rewrite I can't seem to access it. When I go to my.server.come/cgi-bin/test.pl, I get a page not found from my drupal.
Is there a way I can access my cgi-bin without resorting to accessing my drupal through my.server.com/drupal6/?
Background:
I have installed drupal CMS which has a base address of my.server.com/drupal6/ as it resided in /var/www/drupal6/. However I wanted users to be able to access it as my.server.com/ so I added the following into my httpd.conf
Code:
NameVirtualHost *:80
<Directory /var/www/drupal6>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</Directory>
and created a Virtual Host in my sites-available (enabled through a2ensite knowpulse.usask.ca) as follows:
Code:
<VirtualHost *:80>
ServerName knowpulse.usask.ca
DocumentRoot /var/www/drupal6
<Directory />
Options -Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error,
# crit, alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
This appears to work as I can now access all my drupal pages using my.server.com/drupalpages.
What I've Tried:
1a. Adding a cgi-bin location directive to my virtualHost
Code:
#CGI Directory
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin
<Location /cgi-bin>
Options +ExecCGI
</Location>
This gives me a Not Found from Apache
1b. Adding a cgi-bin directory directive to my virtualhost
(as per
http://www.linuxquestions.org/questi...pache2-739485/)
Code:
#CGI Directory
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin
<Directory /cgi-bin>
Options +ExecCGI
</Directory>
This gives me a Not Found from Apache
2. Adding a symbolic link to cgi-bin -> /usr/lib/cgi-bin in /var/www/drupal6/
Seems not to make a difference?
3. Adding a ScriptAlias line to my httpd.conf
Code:
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin
I get a page not found from Apache as compared to drupal.