MAC upgrade to 10.10 (OS X Yosemite) apache+php configuration issues

Source: Internet
Author: User

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

1 sudo apachectl restart

This is where you can access

http://localhost/~zhuzi/

MAC upgrade to 10.10 (OS X Yosemite) apache+php configuration issues

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.