The locally tested site does not function properly after upgrading to the latest system, because the version of his Apache is upgraded with the MAC system upgrade
Server version:apache/2.4.9 (Unix)
Server built:sep 9 2014 14:48:20
The version before upgrade is 10.9
Server version:apache/2.2.26 (Unix) Server Built:dec 10 2013 22:09:38
Basically, the previously configured block was overwritten.
So the site doesn't work properly
The solution is
1 re-enable PHP to prevent PHP script files from appearing directly on the Web page
1 |
sudo mvim /etc/apache2/httpd.conf |
/loadmodule Php5_module libexec/apache2/libphp5.so
Find the line in the file and remove the previous #
Save As you can
2. Open the Support User level directory http://localhost/~username/
The user-level directory cannot be accessed
Not foundthe requested the URL/~zhuzi/was not found on the this server.
No, you need to recreate it.
sudo mkdir ~/sites
At this point you need to configure zhuzi.conf
Add the following code (10.10) to configure the method
12345 |
<Directory "/Users/zhuzi/Sites/" > Options Indexes MultiViews AllowOverride None Require all granted </Directory> |
Then change the directory permissions
sudo chmod 775/etc/apache3/users/zhuzi.conf
You also need to configure httpd.conf
sudo mvim/etc/apache2/httpd.conf
Find a few blocks with Vim's find command to remove the previous #
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.soinclude/private/etc/apache2/extra/ Httpd-userdir.conf
Configure httpd-userdir.conf
1 |
sudo nano /etc/apache2/extra/httpd-userdir.conf |
Remove the # from the front of the block
1 |
Include / private /etc/apache2/users/*.conf |
Restart Apache
This is where you can access
http://localhost/~zhuzi/
MAC upgrade to 10.10 (OS X Yosemite) apache+php configuration issues