How access localhost on high Sierra

How access localhost on High Sierra?

iMac

Posted on Feb 11, 2018 4:39 PM

Reply
Question marked as Top-ranking reply

Posted on Feb 11, 2018 4:41 PM

Are you asking about running a web server? If so you open a browser and type localhost in the address bar. If you have the web server running you will see the default page. If you have not set up your web server yet then follow these instructions:

https://coolestguidesontheplanet.com/install-apache-mysql-php-and-phpmyadmin-on- macos-high-sierra-10-13/

7 replies
Question marked as Top-ranking reply

Feb 11, 2018 4:41 PM in response to Penguin130

Are you asking about running a web server? If so you open a browser and type localhost in the address bar. If you have the web server running you will see the default page. If you have not set up your web server yet then follow these instructions:

https://coolestguidesontheplanet.com/install-apache-mysql-php-and-phpmyadmin-on- macos-high-sierra-10-13/

Feb 12, 2018 10:22 AM in response to Penguin130

Another approach from the Terminal:


  1. Change directory to the folder containing your web site, or web page (e.g. index.html).
  2. python -m SimpleHTTPServer [nnnn] # for python 2.7.n
    1. [nnnn] is optional and defaults to port 8000
    2. Usage: python -m SimpleHTTPServer 8080
  3. python -m http.server [nnnn] # for python 3 only


Now in a new browser window/tab, assuming that you used the default port 8000:


http://localhost:8000


will automatically show the index.html content in the above folder. Or you can display a specific web page:


http://localhost:8000/foo.html

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How access localhost on high Sierra

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.