Use your user’s public_html directory to serve webpages

Using a public_html file in your home directory is much more convenient than /var/www for a local website development environment. The following commands create a file called public_html in your home directory and enable the UserDir module in Apache.

From the command line, enter:

  • $ mkdir ~/public_html
  • $ cd /etc/apache2/mods-enabled
  • $ sudo ln -s ../mods-available/userdir.conf userdir.conf
  • $ sudo ln -s ../mods-available/userdir.load userdir.load
  • $ sudo service apache2 restart
This entry was posted in Musings. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>