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

RE: [cobalt-users] [XTR] cgi-bin outsite web



> -----Original Message-----
> From: cobalt-users-admin@xxxxxxxxxxxxxxx
> [mailto:cobalt-users-admin@xxxxxxxxxxxxxxx]On Behalf Of Brian Dowding
> Sent: Thursday, November 13, 2003 11:12 AM
> To: cobalt-users@xxxxxxxxxxxxxxx
> Subject: RE: [cobalt-users] [XTR] cgi-bin outsite web
> 
> 
> > > I am attempting to create a working script folder outside 
> > the main web 
> > > folder on an XTR (at /home/sites/site6/cgi-bin). I have 
> > researched the 
> > > archives and looked at 
> > http://httpd.apache.org/docs/howto/cgi.html. I 
> > > have 
> > already tried various configurations but the best I can get is 
> > > that scripts placed in the folder will work if I do not use .cgi or 
> > > .pl as an extension.
> > > If I use a .cgi or .pl extension I get a "Script File Not 
> > Found!" error.
> > >
> > > I have a test script that is working with any extension 
> > except .cgi or 
> > > .pl (or without any extension) but as soon as it is renamed with a 
> > > .cgi or .pl extension it stops working.
> > >
> > > I have added "ScriptAlias /cgi-bin/ /home/sites/site6/cgi-bin/" to 
> > > httpd.conf. I have also renamed the folder (and the 
> > httpd.conf entry) 
> > > as cgibin (rather than cgi-bin), as suggested in several 
> > posts, but it 
> > > doesn't make any difference. I have also tried various 
> > other changes 
> > > to
> > > httpd.conf:
> > > removing the AddHandler cgi-wrapper .cgi  AddHandler 
> > cgi-wrapper .pl 
> > > entries, adding AddHandler cgi-script .cgi AddHandler 
> > cgi-script .pl 
> > > or AddHandler cgi-script cgi AddHandler cgi-script pl for example.
> > >
> > > I have also looked at the srm.conf file but haven't made 
> > any changes 
> > > here as this would make server wide changes - I only want this for 
> > > this particular virtual server.
> > 
> > (Not haveing an XTR, I'm covering apache generally)
> > 
> > Make sure the http.conf file includes
> > Options ExecCGI for that site
> > You can put it within a <Directory></Directory> tag set 
> > within the <VirtualHost ......></VirtualHost> tag set for the site.
> > 
> > Could you show us the VirtualHost tag set for the site ??
> > 
> > Paul
> 
> 
> Hi Paul
> 
> This is the current version of the VirtualHost - I have now got 
> the scripts
> in cgi-bin to work but have lost the ability to run scripts that 
> are placed
> within the website. The domain name and IP in the following have been
> changed for security.
> 
> <VirtualHost 81.137.49.80>
> ServerName www.domain.com
> ServerAdmin site6
> DocumentRoot /home/sites/site6/web
> ServerAlias domain.com
> ErrorDocument 401 /error/401-authorization.html
> ErrorDocument 403 /error/403-forbidden.html
> ErrorDocument 404 /error/404-file-not-found.html
> ErrorDocument 500 /error/500-internal-server-error.html
> RewriteEngine on
> RewriteCond %{HTTP_HOST}                !^81.137.49.80(:80)?$
> RewriteCond %{HTTP_HOST}                !^www.domain.com(:80)?$
> RewriteRule ^/(.*)                      http://www.domain.com/$1 [L,R]
> RewriteOptions inherit
> ScriptAlias /cgi-bin/ /home/sites/site6/cgi-bin/
> AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site6/users/$1/web/$3
> # AddHandler chiliasp .asp
> # AddHandler chiliasp .asa
> AddType application/x-httpd-php .php4
> AddType application/x-httpd-php .php
> AddHandler server-parsed .shtml
> AddType    text/html     .shtml
<Directory /home/sites/site6/>
	Options ExecCGI

</Directory>

#and make sure that scripts are not being placed in 
#a directory such as /home/sites/siten/web/cgi-bin/
#as a call to a cgi such as href="/cgi-bin/somecgi.cgi will
#incorrectly be a refernce to the script alias.
#there is no need normally to use a script alias unless you 
#want to have scripts run from a place that is not within the 
#domain folders, at least that's how I use it.
#ie. ScriptAlias /cgi-scripts/ /home/sites/home/web/cgi-bin/
#would allow anyone on my server to run a script located
#at the script alias by calling href="/cgi-scripts/oneofmyscigs.cgi"
#If the script is located within the domain folder then there is not
#normally much need for a scriptalias for that domain.
#I don't think you need to repeat the AddHandlers in each domain
#if they are prescribed outside of the virtual hosts but that 
#is a whole other setup.

> </VirtualHost>
> 
> Best regards
> 
> Brian Dowding
> [mailto:webmaster@xxxxxxxxxxxxxxxxxxxxxx]
> 
> _____________________________________
> cobalt-users mailing list
> cobalt-users@xxxxxxxxxxxxxxx
> To subscribe/unsubscribe, or to SEARCH THE ARCHIVES, go to:
> http://list.cobalt.com/mailman/listinfo/cobalt-users
>