gkeech Posted April 19, 2006 Posted April 19, 2006 I recently installed xampp on my Windows xp machine and everytime i got to my domain name it brings up the xampp control pannel (web based thingy) how do i get it to go to htdocs? Quote
TCH-Tim Posted April 19, 2006 Posted April 19, 2006 The redirect is in the index.php file that is installed in htdocs by default. You can delete that file. Quote
j2k4b Posted April 19, 2006 Posted April 19, 2006 Welcome to TCH... We are glad have you. Just wanted to thank you for this post. I am looking for something like this. Quote
TCH-Don Posted April 20, 2006 Posted April 20, 2006 Welcome to the forums gkeech I just make a folder below htdocs and get to it by http://localhost/folder/ Quote
TCH-JimE Posted April 20, 2006 Posted April 20, 2006 Welcome to the forums. You can edit the httpd to tell apache where you store your files, I put mine at C:\www So I have the following set: DocumentRoot "C:/www" <Directory "C:/www"> and then for each website I have under the virtual hosts: <VirtualHost *:80> ServerName www.local.joomla.com:80 DocumentRoot "C:/www/joomla" </VirtualHost> Where the document root is changed to whatever the path is, and as you can see, to make sure I don't mess up, I have each domain name as www.local.XXXXX.com And then to get the computer to see of this, find your HOSTS file in windows/system32/drivers/etc open it in notepad and add in whatever lines you need, e.g.: 127.0.1.1 www.local.joomla.com Thats it, should work just fine! JimE Quote
surefire Posted April 20, 2006 Posted April 20, 2006 (edited) Jim, what you've described sounds like what I want to do. But I'm having trouble. <VirtualHost *:80>ServerName local.cms.com:80 DocumentRoot "C:/Program Files/xampp/htdocs/cms3" </VirtualHost> I tried above in both httpd.conf and httpd-vhosts.conf Setting in httpd.conf for document root: DocumentRoot "C:/Program Files/xampp/htdocs" Setting in hosts file of windows 127.0.0.1 localhost 127.0.1.1 local.cms.com Result: every time I go to local.cms.com I get the index.php file found in htdocs directory. Normally this would redirect to xampp directory but I changed the code so now it just tells me there's an error with my setup... which is the default error message. So it appears that Apache isn't picking up on my virtual hosts directive but the setting in the 'hosts' file of windows is working. Thanks for the help. Edited April 20, 2006 by surefire Quote
TweezerMan Posted April 20, 2006 Posted April 20, 2006 Setting in hosts file of windows 127.0.0.1 localhost 127.0.1.1 local.cms.com I'm not sure if that IP address is a typo or not, but I think it should be 127.0.0.1, not 127.0.1.1. Your computer and web server normally aren't listening for connections on 127.0.1.1, and this probably would prevent the VirtualHost directives from working. Quote
surefire Posted April 20, 2006 Posted April 20, 2006 I thought for certain that your suggestion, David, would do the trick. But still no love. Quote
TCH-JimE Posted April 21, 2006 Posted April 21, 2006 Hello, There is one more bit, I included it above but I didnt say where to change it, just down from the document root will be the following: ># # This should be changed to whatever you set DocumentRoot to. # <Directory "/var/www/html"> Make sure you change this to exactley the same as your documentroot is above. Is that any good? JimE Quote
surefire Posted April 21, 2006 Posted April 21, 2006 Perfect! That worked. Thank you very much. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.