wormytux Posted January 15, 2008 Share Posted January 15, 2008 good day.. i want to thank you guys for the help. now i have a much clearer view. im taking your advice on using zip. another thing, im using xampp and i want to ask some help from you again if i could just type on the browser a name like " www.mypage.edu" instead of typing "locallhost/....."? ??? my pages are local... thank you so much and hoping for your reply.. thank you.. Quote Link to comment https://forums.phpfreaks.com/topic/86051-re-helpphpweb/ Share on other sites More sharing options...
trq Posted January 15, 2008 Share Posted January 15, 2008 If your using windows, search for a file called hosts (im not sure where it is as I use linux) and place this in it... 127.0.0.1 www.mypage.edu You will also need to configure Apache accordingly. We have an apache board here. Quote Link to comment https://forums.phpfreaks.com/topic/86051-re-helpphpweb/#findComment-439442 Share on other sites More sharing options...
revraz Posted January 15, 2008 Share Posted January 15, 2008 And make sure you save it without an extension after you modify it. Quote Link to comment https://forums.phpfreaks.com/topic/86051-re-helpphpweb/#findComment-439444 Share on other sites More sharing options...
ohdang888 Posted January 15, 2008 Share Posted January 15, 2008 i'd like to do this too.... but don't you have to buy a domain name from a site like GoDaddy.com ???? Quote Link to comment https://forums.phpfreaks.com/topic/86051-re-helpphpweb/#findComment-439451 Share on other sites More sharing options...
KrisNz Posted January 15, 2008 Share Posted January 15, 2008 Do a search for setting up a virtual host on apache running on windows. Quote Link to comment https://forums.phpfreaks.com/topic/86051-re-helpphpweb/#findComment-439454 Share on other sites More sharing options...
trq Posted January 15, 2008 Share Posted January 15, 2008 but don't you have to buy a domain name from a site like GoDaddy.com Changing your hosts file only changes how things are routed in relation to your computer. The hosts file was used a long time ago before DNS, but your computer still checks it. Mine looks like.... # loopback. 127.0.0.1 oblivion.tsp.net oblivion localhost # lan. 192.168.10.1 firewall.tsp.net firewall 192.168.10.2 oblivion.tsp.net oblivion 192.168.10.3 utilserv.tsp.net utilserv 192.168.10.4 stack.tsp.net stack 192.168.10.5 imac.tsp.net imac 192.168.10.6 toshi.tsp.net toshi # my (apache) vhosts 192.168.10.3 mysql.utilserv 192.168.10.3 postgres.utilserv 192.168.10.6 proem.com 192.168.10.6 www.proem.com 192.168.10.6 dev.proem.com 192.168.10.6 stage.proem.com # shortcut to php.net 69.147.83.197 p # IPV6 versions of localhost and co ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts for instance. Quote Link to comment https://forums.phpfreaks.com/topic/86051-re-helpphpweb/#findComment-439458 Share on other sites More sharing options...
awpti Posted January 15, 2008 Share Posted January 15, 2008 Hey, dude. Here's what you can do to fake having a domain (for your own testing): In Windows: Start->Run In the dialog, just paste this: notepad c:\windows\system32\drivers\etc\hosts The file should look similar to.. # Copyright (c) 1993-1999 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host 127.0.0.1 localhost Modify the line thusly; 127.0.0.1 localhost www.domain.com domain.com ex: 127.0.0.1 localhost www.awpti.org awpti.org Quote Link to comment https://forums.phpfreaks.com/topic/86051-re-helpphpweb/#findComment-439459 Share on other sites More sharing options...
trq Posted January 15, 2008 Share Posted January 15, 2008 Why didn't I think of that? Quote Link to comment https://forums.phpfreaks.com/topic/86051-re-helpphpweb/#findComment-439461 Share on other sites More sharing options...
ohdang888 Posted January 15, 2008 Share Posted January 15, 2008 thanks. i have windows vista. and when i try to save it.... it says: Cannot create the c:\windows\system32\drivers\etc\hosts file Make sure the path and file name are correct. BUT... i'm confused because i went through notepad to open it, so it obviously exists at the exact location...according to my permissions, i can write on system 32 files though. Quote Link to comment https://forums.phpfreaks.com/topic/86051-re-helpphpweb/#findComment-439473 Share on other sites More sharing options...
Pancake Posted January 15, 2008 Share Posted January 15, 2008 Right-click the file first, and then give yourself premissions to edit it. Quote Link to comment https://forums.phpfreaks.com/topic/86051-re-helpphpweb/#findComment-439475 Share on other sites More sharing options...
EchoFool Posted January 15, 2008 Share Posted January 15, 2008 vista is horrid for permissions i wish there was a way to turn it off completely. Quote Link to comment https://forums.phpfreaks.com/topic/86051-re-helpphpweb/#findComment-439477 Share on other sites More sharing options...
revraz Posted January 15, 2008 Share Posted January 15, 2008 There is, it's called Windows XP. Quote Link to comment https://forums.phpfreaks.com/topic/86051-re-helpphpweb/#findComment-439482 Share on other sites More sharing options...
wormytux Posted January 15, 2008 Author Share Posted January 15, 2008 Hey, dude. Here's what you can do to fake having a domain (for your own testing): In Windows: Start->Run In the dialog, just paste this: notepad c:\windows\system32\drivers\etc\hosts The file should look similar to.. # Copyright (c) 1993-1999 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host 127.0.0.1 localhost Modify the line thusly; 127.0.0.1 localhost www.domain.com domain.com ex: 127.0.0.1 localhost www.awpti.org awpti.org i configured it(127.0.0.1 localhost www.mypage.com mypage.com) i still can get it to work. i tried to open the page thru firefox but opens a different page. it opens the xampp splash screen. help... ??? Quote Link to comment https://forums.phpfreaks.com/topic/86051-re-helpphpweb/#findComment-439507 Share on other sites More sharing options...
trq Posted January 15, 2008 Share Posted January 15, 2008 Did you configure apache to use virutual hosts? Quote Link to comment https://forums.phpfreaks.com/topic/86051-re-helpphpweb/#findComment-439512 Share on other sites More sharing options...
wormytux Posted January 15, 2008 Author Share Posted January 15, 2008 why didnt i do that.... thanks 'thorpe'... Quote Link to comment https://forums.phpfreaks.com/topic/86051-re-helpphpweb/#findComment-439584 Share on other sites More sharing options...
wormytux Posted January 16, 2008 Author Share Posted January 16, 2008 good day. finally figured it out . thanks you guys. i have here some steps to follow for someone who might encounter the same situation. steps: 1.setting up Hosts go to run and paste this: notepad c:\windows\system32\drivers\etc\hosts add a new line at the end for the offline version of your client site example: 127.0.0.1 www.mypage.co save 2.setting up virtual host go to windows explorer paste this to addbar - C:\xampp\apache\conf open httpd.conf in notepad look for a section containing the text NameVirtualHost 127.0.0.1 and uncomment it if none, paste this below the section of "#virtual hosts" to easily locate it: NameVirtualHost 127.0.0.1 <VirtualHost 127.0.0.1> ServerName www.mypage.co DocumentRoot "C:\xampp\htdocs\mypage" </VirtualHost> save 3. refreshing apache web server locate the xampp control panel and simply click the refresh button. (start->all programs->apache friends->xampp->xampp control panel->click refresh) 4. last step open browser and key-in your site press enter thats all.... ...hoping this might help... Quote Link to comment https://forums.phpfreaks.com/topic/86051-re-helpphpweb/#findComment-440482 Share on other sites More sharing options...
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.