https://donatstudios.com/PHP-in-OS-X-Yosemite
I copied without message to artist.
Firstly, if you don't already have a Sites folder, create one in your home directory.
mkdir ~/Sites
Create or update /etc/apache2/users/{username}.conf to look as follows
<Directory "/Users/{userbane}/Sites/">
Options Indexes MultiViews FollowSymLinks
Require all granted
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Add your virtual hosts if you don't already have them to /etc/apache2/extra/httpd-vhosts.conf
<VirtualHost *:80>
ServerName localhost
DocumentRoot /Users/{username}/Sites/
</VirtualHost>
Enable modules and include config files by uncomment in /etc/apache2/httpd.conf
LoadModule deflate_module libexec/apache2/mod_deflate.so
LoadModule userdir_module libexec/apache2/mod_userdir.so
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
LoadModule php5_module libexec/apache2/libphp5.so
Include /private/etc/apache2/extra/httpd-userdir.conf
Include /private/etc/apache2/extra/httpd-vhosts.conf
Uncomment the following line in /etc/apache2/extra/httpd-userdir.conf
Include /private/etc/apache2/users/*.conf
Restart apache with command: sudo apachectl restart
0 nhận xét:
Đăng nhận xét