Posted by:
CyberSpatium
(---.hsd1.or.comcast.net)
Before you can run Perl scripts, you need to make sure you have the
WAMP ACTIVESTATE PERL ADD-ON. This will install Perl on your computer for you and is needed to run Perl scripts.
I do not have all the time needed explain how to setup to use Perl and a domain in step by step instructions, so just follow them.
You now need to do some editing of httpd.conf to make some changes:
Find:
DirectoryIndex index.php index.php3 index.html index.htm index.html.varChange to:
DirectoryIndex index.php index.php3 index.html index.htm index.html.var index.cgi index.plNow find:
#AddHandler cgi-script .cgiChange to:
AddHandler cgi-script .cgiNow open up your
c:/wamp folder. Create a new folder called
users. Now go to the users folder you just made, and create a new folder named
www.your-domain.com (remember to use replace
your-domain.com part above with your actual domain name, for example,
www.google.com) . Now go to the
www.your-domain.com folder you just made, and now create two folders, one named
logs, the other named
public_htmlThe
public_html is where all your webpage, php scripts, cgi scripts, images, and everything else related for your domain website will go. the
logs folder is where apache access and error logs for you domain will go.
Now go back to your httpd.conf file, and find this line:
#NameVirtualHost *:80Change it to this:
NameVirtualHost *:80
#
#### locahost ####
#
<VirtualHost *:80>
ServerAdmin root@localhost
DocumentRoot C:/wamp/www
ServerName localhost
ErrorLog C:/wamp/logs/error.log
CustomLog C:/wamp/logs/access.log common
<Directory "C:/wamp/www">
Options Indexes FollowSymLinks Includes +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
#
#### your-domain.com ####
#
<VirtualHost *:80>
ServerAdmin webmaster@your-domain.com
DocumentRoot C:/wamp/users/www.your-domain.com/public_html
ServerName www.your-domain.com
ServerAlias your-domain.com
ErrorLog C:/wamp/users/www.your-domain.com/logs/error.log
CustomLog C:/wamp/users/www.your-domain.com/logs/access.log common
<Directory "C:/wamp/users/www.your-domain.com/public_html">
Options Indexes FollowSymLinks Includes +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>Remember to replace all instances of
your-domain.com from the settings above with your actual domain name.
You now need to login to ZoneEdit and create a CNAME record for you domain so people can access your domain using:
http://your-domain.com - AND -
http://www.your-domain.comUse this CNAME record:
Host: www.your-domain.com
Type: CNAME
Value: your-domain.com
Now save the file, and restart apache for the new settings to take effect. Now your site will work with domain name. I have made it so you can use cgi scripts for you domain, and you do not have to use a cgi-bin folder for you cgi scripts, you can run them anywhere in your
public_html folder, including folders inside your
public_html folder.
Also, not too big of a deal but you should use port 8080, not 8000.
Some Help:
Apache 2.x Manual - Directory Index Directive[
httpd.apache.org]
Apache 2.x Manual - AddHandler Directive[
httpd.apache.org]
Apache 2.x Manual - VirtualHost Directive[
httpd.apache.org]
Post Edited (04-08-06 18:54)
CyberSpatium----------------------WAMP Forum Admin
Web Development for Newbie's Blog - Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.