Setting up VHOST

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Setting up VHOST

Postby squills » 13. June 2011 20:38

hello, Iam trying to set up vhost so i can access all 3 of my sites using fake address names
www.fakecomicbt.com
www.fakeftn.com
www.fakecarsite.com


when i use this current setup no matter what address i put in it always takes me to the www.fakecarsite.com files
here is my vhost
http://www.pastie.org/2062447

and my windows host file...
http://www.pastie.org/2062528


thats all i have changed, Also when i edited the vhost file, apache wont start or at least says its not starting. but when i put in any of the address it still takes me to the carsite files.
Any help would be great !
thanks
squills
squills
 
Posts: 15
Joined: 22. November 2009 14:19

Re: Setting up VHOST

Postby Altrea » 13. June 2011 20:54

Please take a look into your \xampp\apache\logs\error.log file.
Everytime Apache can't start there should be further information about that.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8290
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Setting up VHOST

Postby squills » 13. June 2011 21:22

yes you would think, but it stays empty, i think it may be running but the green bar that says running is not working? cause nothing comes up in the error log or the access log also i have to run the xampp control panel in admin mode or else it gives me a error

Code: Select all
XAMPP Control Panel Version 2.5 (9. May, 2007)
Windows 6.1 Build 7600 Platform 2
Curreent Directory: C:\xampp
Install(er) Directory: C:\xampp
ERROR: Status Check Failure [1635760]
This program must be run from your XAMPP root directory


and when i try to start it i get I got error -1.

but when running in admin mode that error (error -1) goes away but the top error is still there..


OK EDIT, not sure if it was bugged or what, but the apache is now running :D now back to vhost?
anyone
squills
 
Posts: 15
Joined: 22. November 2009 14:19

Re: Setting up VHOST

Postby Altrea » 13. June 2011 22:58

squills wrote:but when running in admin mode that error (error -1) goes away but the top error is still there..

Thats a common error of the XAMPP control panel. It's buggy in the v1.7.4 Installer version.
I recommend you to use the recoded XAMPP control panel v3.0.2 instead.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8290
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Setting up VHOST

Postby squills » 13. June 2011 23:06

thanks ill look into that , if i can get these vhost to work.. "P

Do i have to assign the folders any other way? btw if i type in localhost in address bar it still takes me back to the xampp screens
if that helps any..
squills
 
Posts: 15
Joined: 22. November 2009 14:19

Re: Setting up VHOST

Postby Sharley » 14. June 2011 04:01

squills wrote:...if i can get these vhost to work
Make sure that Apache has started, green running in the XAMPP Control Panel.

Then try this by overwriting your current files using copy and paste, if you prefer, to their respective files - check first I have not made any typos. ;)

Hosts file
Code: Select all
127.0.0.1      localhost
# ::1              localhost
127.0.0.1      fakecarsite.com
127.0.0.1      fakeftn.com
127.0.0.1      fakecomicbt.com


httpd-vhosts.conf file
Code: Select all
NameVirtualHost *:80

<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:/xampp/htdocs"
</VirtualHost>

<VirtualHost *:80>
ServerName fakecarsite.com
ServerAlias www.fakecarsite.com *.fakecarsite.com
DocumentRoot "C:/xampp/htdocs/fakecarsite"
<Directory "C:/xampp/htdocs/fakecarsite" >
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ServerAdmin serveradmin@fakecarsite.com
CustomLog "logs/fakecarsite.com-access.log" common
ErrorLog "logs/fakecarsite.com-error.log"
LogLevel error
</VirtualHost>

<VirtualHost *:80>
ServerName fakeftn.com
ServerAlias www.fakeftn.com *.fakeftn.com
DocumentRoot "C:/xampp/htdocs/flipthenet"
<Directory "C:/xampp/htdocs/flpthenet" >
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ServerAdmin serveradmin@flipthenet.com
CustomLog "logs/flipthenet.com-access.log" common
ErrorLog "logs/flipthenet.com-error.log"
LogLevel error
</VirtualHost>

<VirtualHost *:80>
ServerName fakecomicbt.com
ServerAlias www.fakecomicbt.com *.fakecomicbt.com
DocumentRoot "C:/xampp/htdocs/comicbt"
<Directory "C:/xampp/htdocs/comicbt" >
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ServerAdmin serveradmin@comicbt.com
CustomLog "logs/comicbt.com-access.log" common
ErrorLog "logs/comicbt.com-error.log"
LogLevel error
</VirtualHost>
Save the file and restart Apache (a must do) to have the conf file read by the server - clear your browser's cache to avoid any cached files being presented by your browser and when working (developing) at localhost level do this often and in particular if and when you get an unexpected page presented.

Good luck.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Setting up VHOST

Postby squills » 14. June 2011 13:03

THanks a ton.. noidea what you did different them me though?

but thanks it worked like a charm!
squills
 
Posts: 15
Joined: 22. November 2009 14:19


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 90 guests