special18 wrote:... I know this question has bin asked before but for me i coudt make sense of it cause it wasent really a good exampel for me.
I find that hard to believe as there are many very detailed examples of virtual host configurations posted in this forum, and all you needed do, in most cases, was insert your own domain information and path locations of your files.
Here is an example configuration for your first domain in the list, which you should test that it works before adding more - just continue to add the other domains one at a time and test each after adding, don't add more until you are sure there are no errors.
This configuration may give you all the options required to duplicate a hosted web site including it's own cgi and log file configurations.
This is a name based virtual host configuration as an IP based vhost is not recommended in your case unless you have a separate IP from your ISP for each domain name, which I doubt - so we use a wild card IP on port 80 -
*:80 for each domain name.
NameVirtualHost *:80
<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName linklinky.com
ServerAlias
www.linklinky.comDocumentRoot "C:/xampp/htdocs/linklinky"
<Directory "C:/xampp/htdocs/linklinky >
Options Indexes +FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ "C:/xampp/htdocs/linklinky/cgi-bin/"
ServerAdmin
serveradmin@linklinky.comCustomLog logs/linklinky.log combined
ErrorLog logs/linklinky_error.log
LogLevel error
</VirtualHost>
Test this first and if it works without error then just add the other domains in their own vhost containers below the last entry but change the relevant names and paths (
double check that you have no typos) - make sure the directories are created and the paths are correct before testing.
You may need to exit the Internet to test your domains locally and before editing your zone file - see below.
If you get an error after testing the first container linklinky then open a command console window and cd to
C:\xampp\apache\bin
Type the command
apache -S and paste the result here - click on the little icon top left in the window title bar and select
Edit for the
Mark and
Copy commands in the context menu.
Now so you have local access to your domains if you are off line we need to enter those domains in the Windows hosts file.
Open by dragging the hosts file into your text editor:
C:\WINDOWS\system32\drivers\etc\hosts
Add these entries, if any of them are not already included, to the top of the host file - don't rename this
hosts file in any way:
- Code: Select all
127.0.0.1 localhost
127.0.0.1 linklinky.com
127.0.0.1 www.linklinky.com
127.0.0.1 animeresource.org
127.0.0.1 www.animeresource.org
127.0.0.1 valkery.org
127.0.0.1 www.valkery.org
127.0.0.1 willemyn.com
127.0.0.1 www.willemyn.com
www is deemed to be a sub domain of the main domain and as such is treated as a domain alias just like any other regular sub domain regardless of how Google interprets it. - example:
ServerName
linklinky.com
ServerAlias
www.linklinky.com,
secure.linklinky.com,
forum.linklinky.com
BTW - you can still have your domains on your hosted server at
GoDaddy and on your PC, by having your domain name Zone file include the IP of your PC, being as you have a fixed IP -
GoDaddy allows you to edit your Zone file from your Control Panel or your domain name registrar
idotz will have the details and location of your Zone file (DNS) for editing but remember this subject is not XAMPP related.
If when you enter your domain for access locally you go to your hosted site at
GoDaddy then for testing purposes and before you edit the DNS Zone file, temporarily disconnect your Internet connection and importantly make sure your ISP will allow you to host a web server on your IP and has not blocked incoming traffic on port 80 - on cable most ISPs will block email and web servers until you request them to remove the restrictions.