Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Centos 5.5 Web Server

Posted on 2011-02-14
4
Medium Priority
?
574 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
ID: 34891715
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 80

Expert Comment

by:arnold
ID: 34891720
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 2000 total points
ID: 34893662
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
ID: 34899589
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secureā€¦
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month12 days, 10 hours left to enroll

972 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