Invision Power Services: Localhost on Mac - Invision Power Services

Jump to content

Computing & Technology Forum Rules

Our community chat forum areas are for off-topic discussion only. Please do not post topics about IPS or its products and services here. We provide other forum areas for IPS discussion.

Do you need technical support on IPS products or services?

You can obtain support via the client area, or you can try to obtain peer-to-peer support at IPS Resources.

Did you find a bug in one of our products?

If you believe you've found a bug please post it to the bug tracker.

Have a suggestion or feedback?

Use the company feedback forum or appropriate product feedback forum. You can also submit a ticket in your client area if it's a private matter.
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Localhost on Mac Rate Topic: -----

#1 User is offline   RobertMidd Icon

  • I want that one
  • Icon
  • View blog
  • Group: +Active Customers
  • Posts: 3,416
  • Joined: 09-April 03
  • Gender:Male
  • Location:Leeds(UK)

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.
0

#2 User is offline   dziner Icon

  • Advanced Member
  • Icon
  • View blog
  • Group: +Active Customers
  • Posts: 409
  • Joined: 20-September 08
  • Gender:Male

Posted 22 November 2008 - 04:40 PM

View PostRobertMidd, 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.



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.
0

#3 User is offline   RobertMidd Icon

  • I want that one
  • Icon
  • View blog
  • Group: +Active Customers
  • Posts: 3,416
  • Joined: 09-April 03
  • Gender:Male
  • Location:Leeds(UK)

Posted 22 November 2008 - 05:27 PM

View Postdziner, on Nov 22 2008, 05:40 PM, said:

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.


I am using MAMP but I still have to use localhost to serve the webpages off my local server and I want www.robertmidd.com to work.
0

#4 User is offline   Cybertimber2009 Icon

  • Spam Happy
  • PipPipPipPipPip
  • View blog
  • Group: Members
  • Posts: 985
  • Joined: 27-November 03
  • Location:North Carolina

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.

Quote

How some of you people utilize forums on a daily basis and lack the ability to read and comprehend amazes me.
Posted Image
0

#5 User is offline   Stephen Icon

  • Meet Jay
  • PipPipPipPipPipPipPipPipPip
  • View blog
  • Group: Members
  • Posts: 18,123
  • Joined: 22-March 02
  • Gender:Male
  • Location:London, England

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

sudo dscl localhost -create /Local/Default/Hosts/www.robertmidd.com IPAddress 127.0.0.1
dscl localhost -readall /Local/Default/Hosts

Posted Image Posted Image Posted Image Posted Image
0

#6 User is offline   Ian Icon

  • Needs Serious Help
  • Icon
  • View blog
  • Group: +Active Customers
  • Posts: 2,580
  • Joined: 14-February 02
  • Gender:Male

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
0

#7 User is offline   Stephen Icon

  • Meet Jay
  • PipPipPipPipPipPipPipPipPip
  • View blog
  • Group: Members
  • Posts: 18,123
  • Joined: 22-March 02
  • Gender:Male
  • Location:London, England

Posted 23 November 2008 - 12:04 AM

I seem to remember reading that Leopard doesn't obey /etc/hosts hence the dscl command, but I could be wrong.
Posted Image Posted Image Posted Image Posted Image
0

#8 User is offline   RobertMidd Icon

  • I want that one
  • Icon
  • View blog
  • Group: +Active Customers
  • Posts: 3,416
  • Joined: 09-April 03
  • Gender:Male
  • Location:Leeds(UK)

Posted 23 November 2008 - 09:33 AM

View PostStephen, 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

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.
0

#9 User is offline   RobertMidd Icon

  • I want that one
  • Icon
  • View blog
  • Group: +Active Customers
  • Posts: 3,416
  • Joined: 09-April 03
  • Gender:Male
  • Location:Leeds(UK)

Posted 23 November 2008 - 09:35 AM

View PostStephen, on Nov 23 2008, 01:04 AM, said:

I seem to remember reading that Leopard doesn't obey /etc/hosts hence the dscl command, but I could be wrong.


I think you are right as I tried this and it did not work.
0

#10 User is offline   Ian Icon

  • Needs Serious Help
  • Icon
  • View blog
  • Group: +Active Customers
  • Posts: 2,580
  • Joined: 14-February 02
  • Gender:Male

Posted 23 November 2008 - 04:56 PM

View PostStephen, on Nov 23 2008, 12:04 AM, said:

I seem to remember reading that Leopard doesn't obey /etc/hosts hence the dscl command, but I could be wrong.

Don't know, it works for me but I use it for single word domains not www.etc.com domains, so I can't say for sure on that.

Ian
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users