Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am now using CentOS5 as the server providing Apache services. I have managed to setup the web page under /home/user1/public_html, now I wish to change the default web page of our server to /home/user1/public_html. i tried to modify httpd.conf, in which i changed the "/var/www/" to the above user directory, but didnot work. Please kindly suggest. Thank you.
I managed to realize it by making a symbolic link between my user home directory and /var/www/html. And now it works. Appreciate any comments on this methods.
Since you use a symlink, from /home/user1/public_html to /var/www/html there is no problem at all.
Editing a file in /home/user1/public_html is the same as editing it at /var/www/html
Read here the definition of symlink
Since you use a symlink, from /home/user1/public_html to /var/www/html there is no problem at all.
Editing a file in /home/user1/public_html is the same as editing it at /var/www/html
Read here the definition of symlink
Thanks, bathory. But now it seems if adding a new file in my user directory, then /var/www/html can not see this add-file update.. Any configurations I need to fix? Thanks.
This way, if you add a new file or directory in /home/user1/public_html, it won't be reflected in /var/www.html
I just removed the link and tried with "ln -s /home/user1/public_html/ /var/www/html", then created a new "test.txt" in /home/user1/public_html/, the link update still cannot be updated in /var/www/html. Please suggest. Thanks.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.