Create a personal site in Yosemite

Source: Internet
Author: User

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:

    1. Finder, select "Go to Folder" and enter "/etc"
    2. 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

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.