Page 1 of 1
Localhost on Mac
#1
Posted 22 November 2008 - 03:20 PM
I have never used my localhost on my Mac and I know want to setup a local website but I do not want to access this by having to type 127.0.0.1 or localhost in the brower address bar, but something like www.robertmidd.com
When I did this last time, I was using a PC and simply edited the hosts file, rebooted and hey presto it works ... I have tried this on my Mac but it does not work.
What have I done wrong, is there an easier way ?
Thanks in advance.
When I did this last time, I was using a PC and simply edited the hosts file, rebooted and hey presto it works ... I have tried this on my Mac but it does not work.
What have I done wrong, is there an easier way ?
Thanks in advance.
#2
Posted 22 November 2008 - 04:40 PM
RobertMidd, on Nov 22 2008, 04:20 PM, said:
I have never used my localhost on my Mac and I know want to setup a local website but I do not want to access this by having to type 127.0.0.1 or localhost in the brower address bar, but something like www.robertmidd.com
When I did this last time, I was using a PC and simply edited the hosts file, rebooted and hey presto it works ... I have tried this on my Mac but it does not work.
What have I done wrong, is there an easier way ?
Thanks in advance.
When I did this last time, I was using a PC and simply edited the hosts file, rebooted and hey presto it works ... I have tried this on my Mac but it does not work.
What have I done wrong, is there an easier way ?
Thanks in advance.
Use MAMP, once you install the program and launch it you should be able to run any websites, php, etc. Good luck. MAMP is free.
#3
Posted 22 November 2008 - 05:27 PM
#4
Posted 22 November 2008 - 11:18 PM
Well, you'd have to own the domain, then you'd have to have the domain company forward requests to your internet IP address (which typically changes frequently, so I recommend no-ip.com which can deal with that) and then on your router, forward port 80 requests to your computer. THEN you can use a domain name, and you can use it anywhere even your computer.
But (from my personal knowledge) there is no way to shortcut all of that unless you have DNS server right on that computer, and that might cause issues in looking up domains outside of your computer.
But (from my personal knowledge) there is no way to shortcut all of that unless you have DNS server right on that computer, and that might cause issues in looking up domains outside of your computer.
Quote
How some of you people utilize forums on a daily basis and lack the ability to read and comprehend amazes me.

#5
Posted 22 November 2008 - 11:27 PM
No he wouldn’t, if you read you'd see he said he does it on the PC by editing the hosts file so he doesn't actually want it to be real, just local.
Try something like this
Try something like this
sudo dscl localhost -create /Local/Default/Hosts/www.robertmidd.com IPAddress 127.0.0.1 dscl localhost -readall /Local/Default/Hosts
#6
Posted 22 November 2008 - 11:51 PM
Assuming your server is all setup correctly to listen for www.robertmidd.com you should be able to add it to your /etc/hosts file. If you have TextMate run:
mate /etc/hosts
Add the line:
127.0.0.1 www.robertmidd.com
and that should make the domain direct to your local server.
Ian
mate /etc/hosts
Add the line:
127.0.0.1 www.robertmidd.com
and that should make the domain direct to your local server.
Ian
#8
Posted 23 November 2008 - 09:33 AM
Stephen, on Nov 23 2008, 12:27 AM, said:
No he wouldn't, if you read you'd see he said he does it on the PC by editing the hosts file so he doesn't actually want it to be real, just local.
Try something like this
Try something like this
sudo dscl localhost -create /Local/Default/Hosts/www.robertmidd.com IPAddress 127.0.0.1 dscl localhost -readall /Local/Default/Hosts
Thanks so much Stephen, it worked a treat.
#9
#10
Posted 23 November 2008 - 04:56 PM
Page 1 of 1

Sign In
Register
Help



MultiQuote





