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
Solved

Centos 5.5 Web Server

Posted on 2011-02-14
4
545 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 77

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

791 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