VirtualHosts and cgi-bin problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A little background info....
 
I have a default server (My Business) and 3 sponsored virtualhosts at the mo.
 
They are all working without errors, i can browse them all when punching in the respective domain names.
 
The default server has a cgi-bin called cgi-bin,  i have set things up so that this cgi-bin is only accessable by the default server and this works.
 
All scripts on the default server run without errors directly on the browsers address line and via links within the html source code on each page.
 
I have created another cgi-bin called cgi-bin2 and i want all sponsored vhosts to be able to access scripts within this cgi-bin and not the cgi-bin of the default server, this works to a point. The cgi-bin2 is not accessable by anybody logging in via an FTP session.
 
If i type in the address line the path of a cgi script in the cgi-bin2 using any of the sponsored domain names http://www.1stsponsoreddomainname.co.uk/cgi-bin2/footer.cgi , i get what i want, the expected html content prints to screen as expected.  If i try accessing a script in the default servers cgi-bin using the domain name of a sponsored domain name http://www.1stsponsoreddomainname.co.uk/cgi-bin/footer.cgi i get access denied, this is what i want.
 
If i add a link    <!--#exec cgi="/cgi-bin2/footer.cgi"-->   into a html files source code of a sponsored domain name the expected content does not print to screen and the link is visible within the source code of the html file.   Permissions are set to 755 on scripts and html files.
 
The reason for wanting this 2nd cgi-bin is so that i can offer simple scripts to the groups and youth clubs etc that use it, counters etc but more important a simple advert advertising the fact that i am hosting the clubs website for free with a link to my own website and business at the foot of every page.
 
There are no errors in the error logs to give me any clues!  i can deliberatly generate an error and the error does appear in the log files.
 
Can any body help me, what am i missing, doing wrong?
 
Here is a sample of my httpd.conf file:
 
# Default Server

NameVirtualHost *

 

<VirtualHost *>

 

ServerName www.mydomainname.co.uk:80

DocumentRoot /srv/www/htdocs

 

<Directory "/srv/www/htdocs">

 

            Options +Indexes +Includes +ExecCGI

 

            AllowOverride none

            Order allow,deny

            Allow from All

            deny from 69.222.16.9

            deny from 62.49.6.157

            deny from 193.28.178.61

 

ErrorDocument 401 /errors/error_document_401.html

ErrorDocument 403 /errors/error_document_403.html

ErrorDocument 404 /errors/error_document_404.html

 

</Directory>

 

ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"

 

<Directory "/srv/www/cgi-bin">

            AllowOverride None

            Options +ExecCGI +Includes -indexes

 

            Order allow,deny

            Allow from all

 

            ErrorDocument 401 /errors/error_document_401.html

            ErrorDocument 403 /errors/error_document_403.html

            ErrorDocument 404 /errors/error_document_404.html

 

</Directory>

 

<Location /cgi-bin>

 

            AllowOverride None

            Options +ExecCGI +Includes -indexes

            SetHandler cgi-script

 

</Location>

 

</VirtualHost>

 

##################################################################################################

 

# 1st Virtual Host

<VirtualHost *>

 

ServerName www.1stsponsoreddomainname.co.uk:80

DocumentRoot /www/SDCCWebsite/htdocs

CustomLog /www/SDCCWebsite/htdocs/log_files/access_log "%h %l %u %t \"%r\" %>s %b"

ErrorLog /www/SDCCWebsite/htdocs/log_files/error_log

 

<Directory "/www/SDCCWebsite/htdocs">

 

            Options -Indexes +Includes +ExecCGI

 

            DirectoryIndex index.htm index.html homepage.html

 

            AllowOverride None

            Order allow,deny

            Allow from All

 

ErrorDocument 401 /errors/error_document_401.html

ErrorDocument 403 /errors/error_document_403.html

ErrorDocument 404 /errors/error_document_404.html

 

</Directory>

 

ScriptAlias /cgi-bin2/ "/www/cgi-bin2/"

 

<Directory "/www/cgi-bin2">

            AllowOverride None

            Options +ExecCGI +Includes -indexes

 

            Order allow,deny

            Allow from all

 

            ErrorDocument 401 /errors/error_document_401.html

            ErrorDocument 403 /errors/error_document_403.html

            ErrorDocument 404 /errors/error_document_404.html

 

</Directory>

 

<Location /cgi-bin2>

 

            AllowOverride None

            Options +ExecCGI +Includes -indexes

            SetHandler cgi-script

 

</Location>

 

</VirtualHost>


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux