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