Apache Qs: Moving Document Root and PHP with Apache2
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Apache Qs: Moving Document Root and PHP with Apache2
Linux Gurus;
I've been messing around with apache and have two questions.
1.) Is it a bad idea to move your document root? I changed mine to a directory in my home so that I may more easily edit files / ftp files. To get this to work, I had to specify my username in httpd.conf under the user/group section. Does this open up any risks?
2.) I've read that mixing Apache2 and PHP is unstable. What's the straight dope on this?
1) So apache is running with your username? The only thing to remember is that apache now has the same permissions you do - if you could delete any important data with your login, so too can apache when set up this way. It would be better to put apache back the way it was, give the group write access to the files you need to edit, and make yourself a member of that group instead.
2) I haven't seen any stability problems on my machine, but what this usually means is that it's not nearly as well-tested as apache1 with PHP, or that there are still known bugs to work out. If you feel comfortable testing it, go ahead, but be prepared to switch to apache1 if any problems occur for you.
1.) Is it a bad idea to move your document root? I changed mine to a directory in my home so that I may more easily edit files / ftp files. To get this to work, I had to specify my username in httpd.conf under the user/group section. Does this open up any risks?
Well if u r shifhting it to ur home directory than it is a very very bad idea. It certainly increases lots of entry points
Generally document root is moved only to guarantee that size of the /var dir doesnot affect the functionality of ur web server.
2.) I've read that mixing Apache2 and PHP is unstable. What's the straight dope on this?
well this is somewhat debatable topic. i m using this mixture for very long time. although there r some major concerns like environment variables and session management, but it works mfine if u take care of all these
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.