|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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! |
|
#2
|
|||
|
|||
|
>> 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> |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > Can I set up virtual hosts web folders to use extensionless .cgi files? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|