14

I have the following directory setup:

/var/www/html

and

/home/tim/Website/files_here

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?

1
  • 1
    Symlinks are somewhat bad practice on a web-server. There is a good explanation on Server Fault about this: serverfault.com/a/244612/66406. But, in your case, you are using the symbolic link on your root directory, so you can still have the FollowSymLinks option in apache disabled and it would still work. So that security problem wouldn't be an issue.
    – Dan
    Sep 24, 2014 at 15:54

1 Answer 1

22

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.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .