[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] [XTR] cgi-bin outsite web
- Subject: RE: [cobalt-users] [XTR] cgi-bin outsite web
- From: "Brian Dowding" <brian@xxxxxxxxxx>
- Date: Thu Nov 13 08:13:01 2003
- Organization: Equestrian Websites
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
> > 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
</VirtualHost>
Best regards
Brian Dowding
[mailto:webmaster@xxxxxxxxxxxxxxxxxxxxxx]