Solved

Centos 5.5 Web Server

Posted on 2011-02-14
4
546 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 78

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 500 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

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
I NEED A "BARE" LINUX ... 9 93
Install XRDP on Ubuntu Server 16.10 x64 3 65
block mails from a particular country in postfix 7 52
Certificate Request CentOS/Apache 1 27
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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…
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.

696 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