Mike Strong
Mike Strong

Reputation: 940

how do I host my webpage in localhost on my Mac?

I am working on a webpage & I would like to see how it renders on my iPhone's safari browser. Rather than officially purchasing a domain & hosting, because its in the development stage I just want to view it on mobile safari temporarily.

So far I have enabled Web Sharing:

enter image description here

and when i type in my IP address in my iPhone's safari, the localhost seems to be up: enter image description here

I have also re-created the "sites" folder: enter image description here

So How do I host the current webpage i am working on with localhost, then being able to access it on mobile safari? *NOTE I want both the html and css files to be accessed to show a complete webpage

Upvotes: 0

Views: 2215

Answers (2)

Virtua Creative
Virtua Creative

Reputation: 2113

You should consider downloading and installing Prepos and you'll be able to view your website in any device connected to the same network.

It's easy to use and the trial version never expires!

After installing it to your Mac, just drag and drop the site root folder into Prepos. There's a tab where you can see the http path to view in any device: TV, tablet, smartphone or any device with internet access. The only requirement is that they must be connect to the same network.

Upvotes: 1

user3996942
user3996942

Reputation:

  1. Go to your Network Settings.
  2. Then write down your IP Address.
  3. Go to http://youriphere/~youruser/ in Safari or whatever browser and that's it!

Upvotes: 0

Related Questions