PDA

View Full Version : Local-Only Web Host Setup


demon0
25th January 2006, 22:41
I am going to preface this by saying that I am an experienced Linux user. However, I have very little knowledge (other than copying and pasting from howtos on this site and others) with Apache or other Linux server applications. I can recompile a kernel, setup runlevels, but I still have no server experience. I am more used to Mac OSX Server, with its nice GUI setup for Bind and Apache.

Anyway, here is what I want to be able to do. I want to setup a Linux server on the local network of my company. There are going to be client computers (on the same subnet) that are going to have to be able to use this internal server as if it was a web host. So, they are going to have to be able to FTP in to upload and download files, and then see their final work via HTTP. I envision each user to have their own account on the FTP server, and then their home folder's will be served via HTTP.

So, the following would be a test user's setup. He would go to his FTP client and type in the server's internal IP address (e.g. 10.0.0.12), his username, and password. Then, he would see the root of his home folder (say /var/ftpd/users/testuser). He could put his own personal, private files at the root. Then there would be a folder, for example called ./http_docs, where he would upload his website. He could then logoff. Then he opens up Firefox and types in http://10.0.0.12/testuser (which would internally point to {FTP home dir}/http_docs) and sees the site he just uploaded.

I don't need any functionality beyond what I just described. Obviously, only the testuser would have r/w access to that home folder, but everyone would have read access to the ./http_docs folder.

Is this doable? I'm sure a combination of some of the great howtos on this site can let me get this, but I haven't been able to figure it out myself.

Thanks in advance, and don't hesitate to ask me questions because I am sure my above description was hard to understand.

falko
25th January 2006, 23:18
You can follow any of the "Perfect Setup" tutorials on HowtoForge, e.g. the one for Debian: http://www.howtoforge.com/perfect_setup_debian_sarge
and then you install ISPConfig.
In ISPConfig, you create a web site, e.g. www.internaldomain.com (the document root would be /var/www/web1/web), and then you create users for that web site in ISPConfig. Their homedirs would be /var/www/web1/user/<user1>, /var/www/web1/user/<user2>, ..., and they have a directory called web in their homedirs (e.g. /var/www/web1/user/<user1>/web).
Now when you type www.internaldomain.com in your browser's address bar, you go to /var/www/web1/web; when you type www.internaldomain.com/~<username1>, you go to /var/www/web1/user/<user1>/web (of course, <username1> can upload to that directory with FTP).

As you may have noticed, I've used an FQDN (www.internaldomain.com) instead of an IP address because ISPConfig uses name-based vhosts. So you either have to set up an internal DNS server with records for www.internaldomain.com, and all the clients in your LAN have to use this DNS server as primary name server, or you modify each client's hosts file.

demon0
25th January 2006, 23:32
That would probably work nicely, since I know the ISPConfig allows users to login to a web interface to upload files. I am going to check out the ISPConfig section of this forum...