Mac modifies Apache httpd.conf, modifies default access path

Source: Internet
Author: User

1. Open the Modify/etc/apache2/httpd.conf content and look for the following:

[HTML]  View plain  copy documentroot  "/library/webserver/documents"    <Directory  " Library/webserver/documents ">       #       #  Possible values for the Options directive are  "None",  "All",        # or any combination of:        #   indexes includes followsymlinks symlinksifownermatch execcgi  MultiViews       #       # note that   "MultiViews"  must be named *explicitly* ---  "options all"    &NBSP;&NBSP;&NBSP;&NBSP;#&NBSP;DOESN ' t give it to you.        #       # the options directive is both complicated  and important.  please see       # http://httpd.apache.org/docs /2.4/mod/core.html#options       # for more information.        #       options followsymlinks multiviews        MultiviewsMatch Any          #        # allowoverride controls what directives may  be placed in .htaccess files.       # it can  be  "All",  "None", or any combination of the keywords:        #   AllowOverride FileInfo AuthConfig Limit        #       AllowOverride None       &NBSP;&NBsp;  #       # controls who can get stuff  from this server.       #        require all granted   </Directory>   original Apache root directory is/library/webserver/ Documents, which are changed to/users/username/phpsites, are as follows:

[HTML] view plain copy documentroot/users/username/phpsites <Directory/Users/username/phpSites> Options Indexes MultiViews # Apache 2.2 # allowoverride All # order Allow,deny # allow from 127.0 .0.1 # Apache 2.4 Require Local </Directory>

Apache Run Command:

sudo apachectl start//start
sudo apachectl restart//reboot
sudo apachectl stop//Stops

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.