Mac Computer Configuration Apache Server detailed description

Source: Internet
Author: User

Mac computer Server configuration process, whether it is personal learning, or company testing is very practical, streamlined, easy to understand, for Mac computers to do the server to make network data requests for testing.

First step: Navigate to the Apache2 directory

$ cd/etc/apache2/

Step Two: Create a new Sites folder in the Finder and open read and write permissions.

Step three: Show directory list

$ ls

Fourth step: Open the Vim Editor with Administrator privileges and enter the Httpd.con server configuration file, enter the power-on password

$ sudo vim httpd.conf

Fifth step: Find the server default root path, VIM editor input

/documentroot

Sixth step: Navigate to DocumentRoot "/library/webserver/documents" This line dot keyboard I appear-insert-(edit modify)

Seventh Step: Add the # Comment before the two lines

DocumentRoot "/library/webserver/documents" This is the server of the raw computer.

<directory "/library/webserver/documents" >

Eighth step: Click ESC to exit Edit mode

#DocumentRoot "/library/webserver/documents"

#<directory "/library/webserver/documents" >

The cursor locates both lines, copying the two lines

Shift + V To select the row, then press Y to copy the selected line, p to paste the selected row

Nineth step: Find the copied line note Drag the server folder in your Mac to replace the previous two paths

#DocumentRoot "/library/webserver/documents"

DocumentRoot "/users/apple/sites"

#<directory "/library/webserver/documents" >

<directory "/users/apple/sites" >>

Tenth step: Press ESC to exit edit mode to find PHP

/php

Find to PHP Press I edit delete previous comment # ESC exit, open comment means mac support PHP code

#LoadModulephp5_module libexec/apache2/libphp5.so

11th Step: Find Options Follow

/optionsfollow

Navigate to Options Followsymlinksmultiviews

Press I to edit

Add Indexes after the options

Press ESC to exit edit

12th step: Click: Wq Save Exit

13th step: $ sudo apachectl-k restart (restart server)

Appears: HTTPd not running, trying to start represents server startup success

Tenth step: In the browser input 127.0.0.1 or localhost appears below the description service is already well-equipped

Index of/

Name Last modified Size Des Cription

Mac Computer Configuration Apache Server detailed description

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.