HOW TO SET UP A WEB SERVER USED BY MULTIPLE OWNERS IN A LINUX PC Imagine a scenario faced by a server maintainer: 10 users request to set up their own webpages in the same Linux system. The system maintainer has to design a convenient way so that each of them can modify their webpage content independently of others. One of the necessary requirement is that each of them can only has the right the modify their own content but not others, while the webpage content stored in the host Linux PC must be accessible by everyone in the world. This document tell you how to do just that. The main requirement is: the linux PC must be already installed with apache webserver, and that the Linux PC must has an IP address that allows the Linux PC accessible via internet. It is proven to work at least in my fedora 13 Linux PC in USM which now host own webpage, as in www2.fizik.usm.my/tlyoon. First, mkdir /home/apache. The owner of this directory is root:root. All directories used as internet-accessible webpages are to be placed in /home/apache. For example, let's assume two users, tlyoon and RGA, are going to build their internet webpages. Two directories are to be setup for them by root, namely, /home/apache/tlyoon /home/apache/RGA The owners of both must be tlyoon:tlyoon and RGA:RGA Both the owner of /home/apache/tlyoon and /home/apache/RGA must be added to the group apache, e.g., usermod -g apache tlyoon usermod -g apache GRA To check e.g. the group tlyoon belongs to, groups tlyoon The out put will be tlyoon : users wheel apache That confirms tlyoon has been associated with the group 'apache' Then backup the following file: cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.orig Modify /etc/httpd/conf/httpd.conf as mentioned below: ... # ... ... # ... A worked tempalate of httpd.conf can be found in http://www2.fizik.usm.my/configrepo/howto/webserver/httpd.conf.worked. After modifying the http.conf, issue as su service httpd restart Now, the users tlyoon and RGA can build their own webpages by modifying the content in /home/apache/tlyoon and /home/apache/RGA. Since both directories are owned by tlyoon:tlyoon and RGA:RGA respectively, RGA can't modify the content of /home/apache/tlyoon. So is RGA can't modify the content of /home/apache/tlyoon. The above mentioned method can be trivially generalised to any number of users by (1) creating a directory in /home/apache (2) associate the user with group apache, (3) change the ownership of /home/apache/user to that of the particular user. All these users can maintain their own webpages independently of the others and without the possibility to interfer other's webpages. To view the webpage content in e.g., /home/apache/tlyoon, simply type xx.yy.zz.kk/tlyoon in your web browser, where xx.yy.zz.kk is the ip address of your computer. To check what the ip address is , simply issue ifconfig in the terminal. As as example, typing 10.205.19.205/tlyoon from anywhre in the world can see my webpage. By Yoon Tiem Leong School of Physics Universiti Sains Malaysia 11800 USM Penang Malaysia 24 Sept 2012