Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Configuring personal site folders on Mountain Lion and Mavericks

From: Installing Apache, MySQL, and PHP

Video: Configuring personal site folders on Mountain Lion and Mavericks

In versions of OS X prior to 10.8 Mountain Lion, Apple I'll right click in the folder and select new Then I'll save this file and I'll place it in that new sites folder.

Configuring personal site folders on Mountain Lion and Mavericks

In versions of OS X prior to 10.8 Mountain Lion, Apple had a feature that let you easily create a personal website folder. A sub folder of your Home folder named Sites. And you could put your own website assets there and address it as its own distinct website. As I showed previously, the user interface for controlling Apache is gone in Mountain Lion. But you can do the same thing in Mountain Lion manually by just following a few steps in Terminal and in a text editor.

The first step is to create the folder. I'll go to Finder then I'll start in the desktop folder. Then I'll hold down the Command key and press the Up arrow and that takes me to my home folder. And this is where I'll create a new sites folder. I'll right click in the folder and select new folder, and name it sites with an uppercase S. You can name this anything you want. It doesn't have to be sites but I am going to show you how to imitate the behavior of previous version of the operating system.

So the sites folder is being created and now we just need to add a little bit of content. I am going to use text wrangler to create a very simple HTML file. You can use any text editor that you prefer such as Dreamweaver or I'll go to spotlight and type in text wrangler and open the application. I'll start by creating a pair of HTML tags, then a pair of body tags and then within the body, a pair of h1s.

Within the h1 tabs, I'll type in this is my personal website. Then I'll save this file and I'll place it in that new sites folder. Just as I did before, I'll go to my home folder, which is named lynda.com on my computer. From there I'll go down to the sites folder and then I'll name the file index.html. So, now, I have a simple, default webpage. The next step is to add a configuration to Apache. That tells Apache when the user types in a URL that ends with tilde and then my username, it means to open the files in this folder.

I'll close down Text Wrangler, and I'll now go to terminal. In terminal, I'll switch to the users folder underneath the Apache installation folder. I'll type cd, then forward space etc, then Apache two, and then users. This users folder will contain one configuration file for each user who has a personal website. If this is a brand new installation of Mountain Lion and you list out all the files with LS, you should see that there aren't any configuration files there.

If you upgraded to Mountain Lion from an older version of OS X, you might see conf files for each user on the computer. Your job is to create a configuration file for your user profile. To do this, we'll use the editor that's included with OS X. It's named Pico. Its user interface is a little clunky, but it knows how to create system and hidden files. Start by typing sudo for super user do, then pico, then your username.

And this should match the name of your home folder. I'll type lynda.com. Then follow that with the file extension .conf. You are saying, create this file and open it in the Pico editor. When you press return, you might be prompted for your administrative password. If so, type it in and press return and that opens your new file in the editor. Now I'll type in some text. As you will follow along typing in exactly as I'm doing here. It is case sensitive.

I'll start with a directory tag. I start with the beginning tag token a less than character. Then the word directory with an upper case D. Next is the physical name of your sides folder. That's the photo you just created. After a double quote, start with slash users. Then after another slash, the name of you home folder. Again for me, that will be lynda.com. Then after another slash, the name of the subfolder you created and I created a subfolder called sites.

Then close the tag. On the next line, you'll start adding some keywords that tell Apache how this folder should be treated. Start with Options, then Indexes, and then MultiViews. On the next line, type in AllowOverride All. It looks like this. On the following line type in order with an upper case O. Then in all lower case allow,deny. That means that when evaluating permissions for this folder, Apache should give precedence to allow commands.

Then on the next line type in allow from all. And finally, close the directory tag. I'll press Return one more time and I'll review what I've typed. Make sure that you type this in exactly right. You can always come back and edit it again later by executing that same pico command in Terminal. But it's best if you get it right the first time. Once you've confirmed that you've typed everything correctly, press control x to exit pico typing' y' for yes and then return to confirm the file name.

When you come back to the command line, type LS and once again list the files and you should see that the configuration file has been created. Now restart Apache. Type in sudo Apache ctl restart. You won't see any response, but that re-launches the Apache server and it will read that configuration file and be ready to respond. Let's review all the steps that we followed. We created the sides folder, and we populated it with some content.

In terminal, we added a configuration file for the current username, and then restarted Apache. Now, I'll test my personal folder. I'll go to my browser and I'll type in the URL http://localhost and then the tilde character and my username and when I press return, I see my personal web page is displayed, with the content that I typed in. You can follow this process for any user on the computer. Creating configuration files that create exactly the same personal web site as well as created more automatically on older versions of OS X.

Show transcript

This video is part of

Image for Installing Apache, MySQL, and PHP
Installing Apache, MySQL, and PHP

39 video lessons · 44292 viewers

David Gassner
Author

 
Expand all | Collapse all
  1. 17m 35s
    1. Welcome
      1m 9s
    2. Understanding Apache, MySQL, and PHP
      7m 12s
    3. Using the exercise files
      1m 7s
    4. What's new in this update
      3m 35s
    5. Choosing a software stack
      4m 32s
  2. 30m 18s
    1. Installing Apache HTTP Server 2.4 on Windows
      6m 51s
    2. Installing PHP 5.5 on Windows
      4m 12s
    3. Starting Apache from the command line
      5m 24s
    4. Installing MySQL on Windows
      7m 24s
    5. Installing phpMyAdmin on Windows
      6m 27s
  3. 44m 5s
    1. Activating Apache on Leopard and Snow Leopard
      3m 35s
    2. Activating Apache on Lion
      5m 9s
    3. Activating Apache on Mountain Lion and Mavericks
      4m 57s
    4. Configuring personal site folders on Mountain Lion and Mavericks
      6m 59s
    5. Activating PHP on Mac OS X
      6m 12s
    6. Installing MySQL on Mac OS X
      3m 59s
    7. Setting the root user password
      2m 28s
    8. Installing phpMyAdmin on Mac OS X
      6m 16s
    9. Uninstalling MySQL on Mac OS X
      4m 30s
  4. 14m 35s
    1. Installing WampServer
      6m 25s
    2. Managing WampServer
      2m 2s
    3. Defining directory aliases through WampServer
      2m 55s
    4. Changing software versions with WampServer add-ons
      3m 13s
  5. 10m 58s
    1. Installing MAMP
      4m 6s
    2. Configuring Apache and MySQL server ports
      1m 57s
    3. Managing MAMP
      4m 55s
  6. 29m 3s
    1. Installing XAMPP for Windows
      10m 0s
    2. Managing XAMPP for Windows
      4m 4s
    3. Managing MySQL security through XAMPP for Windows
      2m 40s
    4. Installing XAMPP for Mac OS X
      6m 14s
    5. Managing XAMPP for Mac OS X
      2m 27s
    6. Managing MySQL security through XAMPP
      3m 38s
  7. 13m 20s
    1. Installing BitNami for Windows
      6m 31s
    2. Installing BitNami for Mac OS X
      6m 49s
  8. 18m 49s
    1. Handling port conflicts with Skype on Windows
      2m 37s
    2. Handling other port conflicts on Windows
      5m 19s
    3. Detecting and handling port conflicts on Mac OS X
      6m 26s
    4. Configuring Apache to work with IPv6 on Windows 8
      4m 27s
  9. 31s
    1. Goodbye
      31s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Installing Apache, MySQL, and PHP.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.