Solved

Centos 5.5 Web Server

Posted on 2011-02-14
4
539 Views
Last Modified: 2012-05-11
I just installed Apache, MySQL and PHP in my Centos server. I want to host web sites for several clients. I want them to be able to access their files through ftp.
What would be the correct way to do this? Should I create a user account for each client? Where would their html files be stored? Do all html files from all clients are supposed to be stored in the same html folder?
Thanks
0
Comment
Question by:pcelements
4 Comments
 
LVL 3

Expert Comment

by:GerryMtz
Comment Utility
Check this out, this will guide you to the whole Web hosting server setup.

http://www.howtoforge.com/perfect-server-centos-5.2

0
 
LVL 76

Expert Comment

by:arnold
Comment Utility
You would need to install an FTP server wsftp/proftp.
It all depends on how you are managing the addition of the virtual sites to the apache configuration.
YOu can add ftp users with the user's home directory in a location where their web root is. Or they have a special path they have to use once logged in to get into their web root location.

No they do not you can define the document root for each website to a specific directory, the issue would be if you are using SELinux on making sure that those directories are properly referenced as web accessible.

Are you using webmin (www.webmin.com)?
0
 
LVL 31

Accepted Solution

by:
farzanj earned 500 total points
Comment Utility
In your file httpd.conf, when you create Virtual Hosts, you can set each virtual host to a different location which is set up by Document Root tag.

If you don't have too many users, you can enable ftp by creating a separate account for each user.  This way they will have a separate home and control over their own documents.
0
 
LVL 1

Expert Comment

by:haroldpga
Comment Utility
Do each of your users have a different, registered domain name.  If that is the case, then set up each user with a virtual server with it's own directory in the /var/www directory tree...  

Something like this in your /etc/httpd/conf/httpd.conf file:

<VirtualHost _default_:80>
      ServerName www.xyzzy.com
      DocumentRoot /var/www/xyzzy
      ServerAlias *.xyzzy.com
      ServerAlias xyzzy.com
</VirtualHost>


Create a userid for each user, with the home directory being the root directory of their virtual server.  Make sure that each directory has the proper SELinux configuration.  On my server this is:

system_u:object_r:httpd_sys_content_t:s0

The home directory should be owned by and belong to the group of the userid associated with it.  the privileges should be drwxrwxr-x for it and all sub directories and the files should all be -rw-rw-r--

As to FTP, I would prefer to see you use ssh and scp instead of ftp.  More secure.  In fact, move it to a port other than 22 and tell your users to use that port.

Hope this helps
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now