Mac PHP Configuration

Source: Internet
Author: User

Apache Default Path Configuration method Apache's configuration Apache has its own, only the following three commands are available. Open Apache service sudo apachectl start stop Apache service sudo apachectl stop restart service sudo apachectl Restart view version httpd-v manually open Apache service after browser input localhost, you will see the following: it worksPHPConfigurationPHP configuration is very simple, just one thing, go to the/etc/apache2/directory, edit httpd.conf, find LoadModule php5_module libexec/apache2/libphp5.so to release the comments on the line. Restart Apache. Build PHP files in the/library/webserver/documents/directory to test.   The root directory of the virtual directory configuration method program under/library/webserver/documents/, this it works is the inside of the info.php print out. Here's how to change this default directory of Apache to the user directory. 1, in their own user directory to create a new sites folder, my user directory for yanzi 2, into the cd/etc/apache2/users/directory, sudo vim username.conf, the content is: < Directory "/users/yanzi/sites/" >allowoverride alloptions Indexes multiviews followsymlinksrequire all granted</ Directory> the Yanzi in the first line above is the user directory. Then change the file permissions to 644:sudo chmod 644 username.conf 3, into the/etc/apache2/directory, sudo vim httpd.conf remove the comments from the following three sentences: LoadModule authz_ Core_module Libexec/apache2/mod_authz_core.soloadmodule Authz_host_module Libexec/apache2/mod_authz_ Host.soloadmodule Userdir_module libexec/apache2/mod_userdir.so The first two sentences should have no comments, the third sentence to release. Then find the include/private/etc/apache2/extra/httpd-userdir.conf comment release. PS: Just switch to command mode under VIM and then enter/"Words you need find" to quickly find the words you need to find.  4, into the/etc/apache2/extra/directory, sudo vim httPd-userdir.conf will include/private/etc/apache2/users/*.conf this sentence to release comments.   then terminal input: sudo apachectl restart restart Apache, browser input: loacal/~yanzi/can see the effect. (Yanzi is the name of my user directory, the back does not add/sites) after the above steps Apache did well

Mac PHP Configuration

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.