Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 12th, 2001, 07:51 PM
Max Close Max Close is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Posts: 2 Max Close User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Can I set up virtual hosts web folders to use extensionless .cgi files?

As a complete beginner to the Server Admin game, I'm having trouble trying to please a client who wishes to run cgi files from their 'web' directory without using extensions and without using a cgi-bin. I have looked into ScriptAlias, but the directive seems to want to only work on a directory in the url path (ie after the 'web').

Anyone who can help me with this (in fairly straightfoward terms) will surely be blessed with a long life and short troubles!

Reply With Quote
  #2  
Old August 12th, 2001, 08:44 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> a client who wishes to run cgi files from their 'web' directory without using extensions and without using a cgi-bin

Set his <VirtualHost> like so:

<VirtualHost *>
DocumentRoot "/www/vhosts/yourclient.com/htdocs"
ServerName www.yourclient.com
ServerAlias yourclient.com
ServerAdmin webmaster@yourclient.com
ScriptAlias /anything/ "/www/vhosts/yourclient.com/cgi-bin/"
</VirtualHost>

With this setup, he can put whatever extensionless CGI scripts to the absolute file system path of his cgi-bin directory. Say he hates the name cgi-bin for whatever lame reasons, then just change that to:

ScriptAlias /anything/ "/www/vhosts/yourclient.com/my_kickass_CGI_scripts/"

When someone visits http://yourclient.com/anything/guest.cgi, that's really executing /www/vhosts/yourclient.com/my_kickass_CGI_scripts/guest.cgi.

If he wants the /anything part to be changed instead, then set it to whatever:

ScriptAlias /whatever/ "/www/vhosts/yourclient.com/my_kickass_CGI_scripts/"

There is something you need to educate this client:
1) With such setup, he can run extensionless CGI scripts in his "my_kickass_CGI_scripts" directory
2) Nothing else other than CGI scripts can be resided in my_kickass_CGI_scripts directory or below.
- no .htaccess, no .htpasswd, no php script, no image, no anything other than true CGI scripts.
3) If he wants to store dat file or whatever under his ScriptAlias'ed directory, use another directory instead.

e.g.

<Directory "/www/vhosts/yourclient.com/non_scriptalias_cgi_dir">
Options ExecCGI
AllowOverride All
</Directory>

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Can I set up virtual hosts web folders to use extensionless .cgi files?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT