Mac PHP configuration, macphp configuration _php Tutorial

Source: Internet
Author: User
Tags php print

Mac PHP configuration, macphp configuration


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 works PHP ConfigurationPHP 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 is Yanzi 2, into the cd/etc/apache2/users/directory, sudo vim username.conf, the content is: allowoverride alloptions Indexes multiviews followsymlinksrequire all granted 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/will be able to see the effect. (Yanzi is the name of my user directory, the back does not add/sites) after the above steps Apache did well

http://www.bkjia.com/PHPjc/1115254.html www.bkjia.com true http://www.bkjia.com/PHPjc/1115254.html techarticle mac PHP configuration, macphp configuration Apache default path configuration Apache configuration Apache has been brought in, only the following three commands are available. Open Apache service sudo apachectl start stop ...

  • 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.