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 trying to set up a web server running CentOS 5, and I've already installed the PHP, Apache, and MySQL packages. However the files for the Apache server are installed in /var/www/html, which seems like a strange folder to keep the files in. On an account I have for web hosting elsewhere, whenever I FTP in my default folder is in /home/, so I'm not sure if that is the "normal" place to keep website files when running a server or not, but I'm just curious about it.
I am trying to set up a web server running CentOS 5, and I've already installed the PHP, Apache, and MySQL packages. However the files for the Apache server are installed in /var/www/html, which seems like a strange folder to keep the files in. On an account I have for web hosting elsewhere, whenever I FTP in my default folder is in /home/, so I'm not sure if that is the "normal" place to keep website files when running a server or not, but I'm just curious about it.
FTP is different from web, and they use different config files. The /var/www/html is fairly "normal", for alot of distros, but easily changed. Look for the DocRoot directive in your apache config, and change it to be whatever you'd like, if you want to move things.
NOTE: I *THINK* it's DocRoot...might be DocHome...not in front of my box now.
Have a look in the Linux Standards Base [1]. There are more possibilities to place the www root.
I prefer to place the files in /srv/www/ and link it to /var/www/html. As I also like to place files on a server in the default directory. So another admin has no difficulties to find the files.
As TB0ne said it's fairly normal to be here, Since I have a CentOS server I can say it's DocumentRoot and the config can be found at /etc/httpd/conf/httpd.conf. As already stated FTP is different, it's always possible to create an account that opens on a folder within the DocumentRoot. However myself, I use a folder within home for the purpose of SCP (much safer then FTP) and a couple of small script to copy files to where I generally place uploaded files too.
P.S. I normally back-up httpd.conf before I have to edit it, very easy to break it and apache is likely to complain like crazy if anything is wrong.
Last edited by r3sistance; 11-21-2008 at 10:25 AM.
Well I have worked with httpd.conf before, as I've worked with Apache on Windows for around 2-3 years now, I just haven't ever used it on Linux so i wasn't sure what the "norm" was for setting up an Apache server, but if the default directories work then I think I'm all set!
Well I have worked with httpd.conf before, as I've worked with Apache on Windows for around 2-3 years now, I just haven't ever used it on Linux so i wasn't sure what the "norm" was for setting up an Apache server, but if the default directories work then I think I'm all set!
As with most things in life...'normal' is a matter of opinion...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.