Quote
1) Create cgi-bin outside the document root, i.e., say your website is in www/public_html, then create www/cgi-bin
The answer is yes, you can create cgi-bin either inside or outside www folder; for example, www/friend1, www/buddy2 or d:/friend1, e:/buddy2
Quote
2) Set up a vhost for implied domain, and assign it to use said cgi-bin as the executable directory (it doesn't necessarily have to be the cgi-bin directory for this discussion, its simply convenient...)
VH for sub-domains would be
<VirtualHost *:80>
ServerName friend1.your_domain.com
DocumentRoot C:/wamp/www/friend1
ScriptAlias /cgi-bin/ "C:/wamp/www/friend1/cgi-bin/"
<Directory "C:/wamp/www/friend1">
Options Indexes FollowSymLinks Includes +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName buddy2.your_domain.com
DocumentRoot e:/buddy2
ScriptAlias /cgi-bin/ "e:/buddy2/cgi-bin/"
<Directory "e:/buddy2">
Options Indexes FollowSymLinks Includes +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
and VH for domains would be
<VirtualHost *:80>
ServerName www.friend1_domain.com
DocumentRoot C:/wamp/www/friend1
ScriptAlias /cgi-bin/ "C:/wamp/www/friend1/cgi-bin/"
<Directory "C:/wamp/www/friend1">
Options Indexes FollowSymLinks Includes +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName www.buddy2_domain.com
ScriptAlias /cgi-bin/ "e:/buddy2/cgi-bin/"
<Directory "e:/buddy2">
Options Indexes FollowSymLinks Includes +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Quote
3) Assume the ScriptAlias (or Alias, depending on your method for setting it up) is "/cgi-bin/"
Then url for sub-domains would be:
"[
friend1.your_domain.com];
"[
buddy2.your_domain.com];
And url for domains would be:
"[
www.friend1_domain.com];
"[
www.buddy2_domain.com];
Example cgi test script here (click submit to run cgi script, will be closed after an hour or two)
[
test.jlbn.com]
Have fun,
FREE One A DayFREE PhotoFREE GamesFREE WebsitesFREE Portable GPSFREE WAMP GuidesEdited 1 time(s). Last edit at 05/28/2008 06:28AM by yfastud.