Yosemite change is very big, followed by a heap of pits, before the previous version of the OS effective method on the new version of the OS has no effect, creating a personal site is one example.
Mac OS built-in Apache, the installation directory is hidden by default in/etc/apache2/,etc. Can be viewed in any of the following ways:
- Finder, select "Go to Folder" and enter "/etc"
- Terminal, enter "Open/etc"
First, modify the file /etc/apache2/httpd.conF
Navigate to Line 166: #LoadModule userdir_module libexec/apache2/mod_userdir.so
Remove the # from the beginning of the sentence, i.e. uncomment to make it effective
Reposition to Line 493: #Include/private/etc/apache2/extra/httpd-userdir.conf
Also, remove the first sentence of the #
Second, modify the file /etc/apache2/extra/httpd-userdir.conf
Navigate to Line 16: #Include/private/etc/apache2/users/*.conf
Get rid of the beginning of the sentence
Again, check if /etc/apache2/users/<your username>.conf exists.
If not, create one that reads as follows:
<directory "/users/<your username>/sites/" >
AddLanguage en. en
Languagepriority en fr de
Forcelanguagepriority Fallback
Options Indexes MultiViews
AllowOverride None
Order Allow,deny
Allow from localhost
Require all granted
</Directory>
Where <your username> to replace your personal username.
Also, check to see if the /users/<your username>/sites directory exists and create a
Then find a web file to put in, file name changed to Index.html
Finally, reboot the Apache server to run the command at the terminal terminal:
sudo apachectl restart
Now that Setup is complete, here's a test:
Input http://localhost, normal will show it works!
In fact, it calls the Apache server's default Web root directory file:/library/webserver/documents/index.html.en
To test your personal site, you need to enter Http://localhost/~<your username>
This will call the index.html that you just put in the Sites directory.
For more details see
https://discussions.apple.com/docs/DOC-3083
Create a personal site in Yosemite