Ubuntu – Is it okay to use symbolic links in the web server


I have the following directory setup:




The folder html is actually a link to /home/tim/Website. This means all my Website files are in my home area (they get included in the backup etc).

Is there anything wrong with this method? Is there a better way to get the homepage to be in /home/tim/Website?

Are symbolic links on a web server ever incompatible with users not on linux?

Best Answer

  • There's nothing wrong with that, as long as the apache process can read the files in your home directory.

    If you're on a development machine, you could just as well put your files under the /var/www directory or a subdirectory thereof, but you can also edit /etc/apache2/sites-available/default so that the line with DocumentRoot points to your /home/tim/Website/files_here folder.

    There's also mod_userdir, an apache module that permits files in /home/<username>/public_html to be served.