GIDForums  

Go Back   GIDForums > Web Hosting Forums > Apache Web Server Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 04-Aug-2004, 09:35
blimbo blimbo is offline
New Member
 
Join Date: Aug 2004
Posts: 1
blimbo is on a distinguished road

Two virutal hosts, cgi script behaves differently on each


Hi everyone,

I have a Perl cgi script running on our apache server which is set up with multiple virtual hosts.

The two hosts I'm testing the script on seem to have the same configuration options, though the script fails when run on one of them (www.nestegg_test.ac.uk), though works fine on the other (gc.mds.qmw.ac.uk/cgi-bin/script.cgi).

The source of the problem is that when the Perl script runs a `pwd` command, the correct directory is returned when the script works but nothing is returned when the script is run from www.nestegg_test.ac.uk; so basically the working directory is being blocked somehow. (The script goes on to run a java program which fails complaining it can't figure out the working directory). Permissions are looking ok so I've run out of ideas. I've enclosed the relevant httpd.conf section.

Can anyone see what the difference/problem is?

Thanks in advance,

Tim

.................................................. ................

#ServerName 192.168.1.110
NameVirtualHost 192.168.1.110

<VirtualHost 192.168.1.110>

ServerName gc.mds.qmw.ac.uk
DocumentRoot "/usr/apache_ssl/htdocs"

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

<Directory "/usr/apache_ssl/htdocs">
Options Indexes FollowSymLinks
AllowOverride AuthConfig
#Order allow,deny
#Allow from all
allow from 192.168.1 138.37
deny from all
</Directory>

<Directory "/tmp">
Options Indexes MultiViews
AllowOverride None
#Order allow,deny
#Allow from all
allow from 192.168.1 138.37
deny from all
</Directory>

UserDir public_html
DirectoryIndex index.html
AccessFileName .htaccess
<Files .htaccess>
Order allow,deny
Deny from all
</Files>
UseCanonicalName On
TypesConfig /usr/apache_ssl/conf/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
MIMEMagicFile /usr/apache_ssl/conf/magic
</IfModule>
HostnameLookups Off
ErrorLog /var/apache/logs/error_log
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /var/apache/logs/access_log common
ServerSignature Off
Alias /icons/ "/usr/apache_ssl/icons/"
<Directory "/usr/apache_ssl/icons">
Options Indexes MultiViews
AllowOverride None
#Order allow,deny
#Allow from all
allow from 192.168.1 138.37
deny from all

</VirtualHost>
<Directory "/usr/apache_ssl/cgi-bin/"> ##### Script is in here
Options Indexes FollowSymLinks
AllowOverride AuthConfig
allow from 192.168.1 138.37
deny from all

AuthName "NESTEGG"
AuthType Basic
AuthUserFile /usr/apache/cgi-bin/tim/.htpasswd
AuthGroupFile /dev/null
require valid-user
</Directory>

#User web
#Group info

#ServerName 192.168.1.110

<VirtualHost 192.168.1.110:80>

ServerName www.nestegg_test.ac.uk
ServerAdmin r.j.dobson@qmul.ac.uk

DocumentRoot "/usr/apache_ssl/htdocs/bright"
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

<Directory "/usr/apache_ssl/htdocs">
Options Indexes FollowSymLinks
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
UserDir public_html
DirectoryIndex index.html
AccessFileName .htaccess
<Files .htaccess>
Order allow,deny
Deny from all
</Files>
UseCanonicalName On
TypesConfig /usr/apache_ssl/conf/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
MIMEMagicFile /usr/apache_ssl/conf/magic
</IfModule>
HostnameLookups On
ErrorLog /var/apache/logs/bright_error_log
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /var/apache/logs/bright_access_log common
ServerSignature Off
Alias /icons/ "/usr/apache_ssl/icons/"
<Directory "/usr/apache_ssl/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /manual/ "/usr/apache_ssl/htdocs/manual/"
ScriptAlias /cgi-bin4/ "/usr/apache_ssl/bright/cgi-bin4/"

<Directory "/usr/apache_ssl/bright/cgi-bin4">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

######below stops people getting to cgi-bin and phpmyadmin and private docs area if not using https

<Directory "/usr/apache_ssl/htdocs/bright/docs">
#AuthType Basic
#AuthName bright
#AuthUserFile /usr/apache_ssl/bright/users
#require valid-user


AllowOverride None
Options None
Order allow,deny
Deny from all
</Directory>


<Directory "/usr/apache_ssl/bright/cgi-bin">
#AuthType Basic
#AuthName bright
#AuthUserFile /usr/apache_ssl/bright/users
#require valid-user


AllowOverride None
Options None
Order allow,deny
Deny from all
</Directory>

<Directory "/usr/apache_ssl/bright/cgi-bin1"> ####### And here
#AuthType Basic
#AuthName bright
#AuthUserFile /usr/apache_ssl/bright/users1
#require valid-user


AllowOverride None
Options None
Order allow,deny
Deny from all
</Directory>


<Directory "/usr/apache_ssl/bright/cgi-bin2">
#AuthType Basic
#AuthName bright
#AuthUserFile /usr/apache_ssl/bright/users2
#require valid-user


AllowOverride None
Options None
Order allow,deny
Deny from all
</Directory>

<Directory "/usr/apache_ssl/htdocs/bright/phpMyAdmin-2.3.0-rc2/">

AllowOverride None
Options None
Order allow,deny
Deny from all
</Directory>
</VirtualHost>



<VirtualHost 192.168.1.110:443>

ServerName www.nestegg_test.ac.uk
ServerAdmin r.j.dobson@qmul.ac.uk

DocumentRoot "/usr/apache_ssl/htdocs/bright"
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/usr/apache_ssl/htdocs">
Options Indexes FollowSymLinks
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>

Alias "/tmp" "/tmp/"
# create an alias so that things can be read from the tmp directory

<Directory "/tmp">
Options Indexes MultiViews
#AllowOverride None
#Order allow,deny
#Allow from all
AuthType Basic
AuthName bright
AuthUserFile /usr/apache_ssl/bright/users1
require valid-user
</Directory>

<Directory "/userdata/home/tim/images">
Options Indexes MultiViews
#AllowOverride None
#Order allow,deny
#Allow from all
AuthType Basic
AuthName bright
AuthUserFile /usr/apache_ssl/bright/users1
require valid-user
</Directory>


UserDir public_html
DirectoryIndex index.html
AccessFileName .htaccess
<Files .htaccess>
Order allow,deny
Deny from all
</Files>
UseCanonicalName On
TypesConfig /usr/apache_ssl/conf/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
MIMEMagicFile /usr/apache_ssl/conf/magic
</IfModule>
HostnameLookups On
ErrorLog /var/apache/logs/bright_error_log
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /var/apache/logs/bright_access_log common
ServerSignature Off
Alias /icons/ "/usr/apache_ssl/icons/"
<Directory "/usr/apache_ssl/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /manual/ "/usr/apache_ssl/htdocs/manual/"

#DOCS area
<Directory "/usr/apache_ssl/htdocs/bright/docs">
AuthType Basic
AuthName bright
AuthUserFile /usr/apache_ssl/bright/users
require valid-user

#######old bit below which was used before we password protected the cgi-bin
# AllowOverride None
# Options None
# Order allow,deny
# Allow from all
</Directory>

#CGI-BIN
ScriptAlias /cgi-bin/ "/usr/apache_ssl/bright/cgi-bin/"
<Directory "/usr/apache_ssl/bright/cgi-bin">
AuthType Basic
AuthName bright
AuthUserFile /usr/apache_ssl/bright/users
require valid-user

#######old bit below which was used before we password protected the cgi-bin
# AllowOverride None
# Options None
# Order allow,deny
# Allow from all
</Directory>

#CGI-BIN1
ScriptAlias /cgi-bin1/ "/usr/apache_ssl/bright/cgi-bin1/"
<Directory "/usr/apache_ssl/bright/cgi-bin1">
AuthType Basic
AuthName bright
AuthUserFile /usr/apache_ssl/bright/users1
require valid-user

#######old bit below which was used before we password protected the cgi-bin
# AllowOverride None
# Options None
# Order allow,deny
# Allow from all
</Directory>

#CGI-BIN2
ScriptAlias /cgi-bin2/ "/usr/apache_ssl/bright/cgi-bin2/"
<Directory "/usr/apache_ssl/bright/cgi-bin2">
AuthType Basic
AuthName bright
AuthUserFile /usr/apache_ssl/bright/users2
require valid-user

#######old bit below which was used before we password protected the cgi-bin
# AllowOverride None
# Options None
# Order allow,deny
# Allow from all
</Directory>

#CGI-BIN3
ScriptAlias /cgi-bin3/ "/usr/apache_ssl/bright/cgi-bin3/"
<Directory "/usr/apache_ssl/bright/cgi-bin3">
AuthType Basic
AuthName bright
AuthUserFile /usr/apache_ssl/bright/users3
require valid-user

#######old bit below which was used before we password protected the cgi-bin
# AllowOverride None
# Options None
# Order allow,deny
# Allow from all
</Directory>
 
 

Recent GIDBlogMatch IP in CIDR by gidnetwork

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Network Sites: GIDNetwork · GIDApp · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 03:06.


vBulletin, Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.