Standard Apache's solution for this is userdir module, which automatically enables access to public_html folder in users' home directories, through http://localhost/~username
- see documentation: http://httpd.apache.org/docs/2.2/howto/public_html.html
(XAMPP's configuration is in /opt/lampp/etc/extra/httpd-userdir.conf )
Anyway, easier solution for you may be through aliases. Add this to httpd.conf (or create separate configuration file which you can then include):
- Code: Select all
Alias /scott "/home/scott/public_html"
Options Indexes FollowSymLinks
I assume you have standard home directory in /home/scott. Also, make sure you have proper access rights set on both you home directory (at least execute for everyone) and public_html (read and execute for everyone) - that's because Apache is running as different user and group. If you get 403 error, try to play with permissions a bit.
Or you can use roughly MC10's solution and create symlink to directory /opt/lampp/htdocs/scott