HomeBlogsStart an Apache Web Server on Mac OS El Capitan, Mavericks, &...

Start an Apache Web Server on Mac OS El Capitan, Mavericks, & Mountain Lion

This guide is about the Start an Apache Web Server in Mac OS X El Capitan, Mavericks, & Mountain Lion. I will try my best so that you understand this guide very well. I hope you all like this guide Start an Apache Web Server in Mac OS X El Capitan, Mavericks, & Mountain Lion.

The sharing settings panel settings were slightly changed in OS X Mountain Lion and again in the Mavericks, and while things like Internet sharing still exist, the web sharing settings panel was removed. The Apache web server is still included with Mac OS X, but you need to go to the command line to enable the web server. Additionally, you must edit the user configuration file for each Mac user account for the personal network sharing feature to be active. If any of these sound scary or complicated, it really isn’t, just follow and follow a simple web server that works on your Mac in an instant.

Configuring and starting the Apache web server in OS X.

Earlier versions of OS X for El Xitan, Yosemite, Mavericks, Mountain Lion, and Mavericks can simply enable Web Sharing, but as of 10.8, 10.9, 10.10, and 10.11, you must do the following to access the local network server:

  • Start the terminal located in / Applications / Utilities /
  • Type the following command, replacing USERNAME with the short name of the user account:
  • nano /etc/apache2/users/USERNAME.conf

  • Enter the administrator password when prompted, and then paste the following into the nanotext editor:
  • Settings Directories MultiviewsAllowOverride AuthConfig LimitOrder allow, denyAllow from all In the .conf file it looks like this:Apache web server in the Mac OS X user configuration file

  • Edit the directory path USERNAME to the correct username
  • Now press Control + O to save the changes to USERNAME.conf and then press Control + X to exit nano
  • Next you Start the Apache web server with the following command:
  • sudo apachectl Start

  • Start Safari, Chrome or Firefox and go to “http://127.0.0.1” to make sure the server is running, you will see “It works!” message

Now that you have started a successful Apache server on OS X, you can either edit the kernel ‘localhost’ files or go further with the user files.

Location and user site folders for Apache web server documents

Note that if you just want to access and edit the ‘localhost’ roots and not the user level Sites at localhost / ~ user, you will find the Apache web server files and ‘It Works!’ html in:

/ Library / WebServer / Documents /

You can now also visit http://127.0.0.1/~USERNAME/ to see all the content stored in the user’s ~ / Sites / directory – if there is anything per user – and you can add an index.html file or whatever else you want in the directory to serve it to the outside world or even just a local area network.

Using http: // localhost / is also great, and by editing the hosts file you can place the local domain anywhere you want to create a local test environment in an otherwise live domain.

This whole process is pretty fast and can be completed in less than a minute, as the video tutorial below shows:

Shutting down the Apache device and restarting the Apache server

To shut down the web server, return to the command line and type the following:

sudo apachectl quit

If you make changes to the server and just want to restart it, you can do so with the following command:

sudo apachectl restarts

The default Apache server is barebones and does not have PHP, MySQL or anything else particularly cool. You can either install and configure them manually, or you can go a predefined route through an all-in-one server application, such as MAMP, that includes Apache, MySQL, and PHP applications in a simply manageable application-based web server package. You can get MAMP for free here.

Thanks to Ben for the hint idea

Benefits: Start an Apache Web Server in Mac OS X El Capitan, Mavericks, & Mountain Lion

[wpsm_list type=”star”]

  • The Start an Apache Web Server in Mac OS X El Capitan, Mavericks, & Mountain Lion guide is free to read.
  • We help many internet users follow up with interest in a convenient manner.
  • The price of the Start an Apache Web Server in Mac OS X El Capitan, Mavericks, & Mountain Lion guide is free.

[/wpsm_list]

FAQ: Start an Apache Web Server in Mac OS X El Capitan, Mavericks, & Mountain Lion

[wpsm_accordion]
[wpsm_accordion_section title=”Guide about Start an Apache Web Server in Mac OS X El Capitan, Mavericks, & Mountain Lion”]
In this guide, I told you about the Start an Apache Web Server in Mac OS X El Capitan, Mavericks, & Mountain Lion.
[/wpsm_accordion_section]
[wpsm_accordion_section title=”How this Guide helping you?”]
In this guide, I discuss about the Start an Apache Web Server in Mac OS X El Capitan, Mavericks, & Mountain Lion, which is very helpful.
[/wpsm_accordion_section]
[wpsm_accordion_section title=”What are the supported devices for this guide?”]
Apple Devices only.
[/wpsm_accordion_section]
[wpsm_accordion_section title=”What are the supported Operating system?”]
mac OS or iOS
[/wpsm_accordion_section]
[/wpsm_accordion]
[wpsm_divider top=”2px” bottom=”15px” style=”fadeout”]

Final note: Start an Apache Web Server in Mac OS X El Capitan, Mavericks, & Mountain Lion

If you have any queries regards the Start an Apache Web Server in Mac OS X El Capitan, Mavericks, & Mountain Lion, then please ask us through the comment section below or directly contact us.
Education: This guide or tutorial is just for educational purposes.
Misinformation: If you want to correct any misinformation about the guide “Start an Apache Web Server in Mac OS X El Capitan, Mavericks, & Mountain Lion”, then kindly contact us.
Want to add an alternate method: If anyone wants to add more methods to the guide Start an Apache Web Server in Mac OS X El Capitan, Mavericks, & Mountain Lion, then kindly contact us.
Our Contact: Kindly use our contact page regards any help.

James Hogan
James Hogan is a senior staff writer at Bollyinside, where he has been covering various topics, including laptops, gaming gear, keyboards, storage, and more. During that period, they evaluated hundreds of laptops and thousands of accessories and built a collection of entirely too many mechanical keyboards for their own use.

RELATED ARTICLES

Must Read

- Advertisment -