Using EHCP for internal server for training purposes
Sorry, if I'm repeating some previous topic, but I could find a solution.
I installed EHCP at a server with static IP in LAN. I'm gonna use this server for training purposes, for users create and upload websites to the server. The server will not be used to access from outside.
My question is: can I have non-existing domain names (e.g. www.server.lan, www.user1.lan, www.user2.lan...) to be used within LAN? I mean, all domain names are registered through the EHCP-server and can be accessible by the other PC-s within LAN.
I understand, that probably i need to edit /etc/hosts files on each PC. I can do that, or look for some automated solutions.
I want users to login to EHCP on www.server.lan and be able to control their domain names, ftp-accounts, etc.
Say, user1 will have
- domain name www.user1.lan
- web-folder, located at /var/www/user1
- ftp-account user1, granted all permissions within /var/www/user1
Is this possible to do with EHCP?
I'll appreciate any help!
Thank you for your great contribution and passion for Open Source!
Mon, 10/04/2010 - 16:05
you know the hosts file
you know the hosts file technique for that purpose.
You also know that, there is no need to "register" a domain, if you only want it to be internally accessible.
I think, automating hosts file can easily be done using php/python, by fetching list of domains from ehcp db,domains table.
I may suggest a second way: just set dns server or those computers as ehcp-server. this case, no hosts file needed. all student computers fetch domain information from dns server(here ehcp server), so, they directly see those "internal domains".
however, keep in mind that, students will not be able to browse normal websites, without switching to original dns.
for training purposes, I think ehcp is quite useful for studenets, since, it is opensource, modular and easily modifiable.
I will help as much as I can for you, teachers/students..
Mon, 10/04/2010 - 16:18
I've played around with it, and can see now that THEORETICALLY it is possible (with exception of /var/www/user1 directory). But when I tried to implement it PRACTICALLY, I've faced a lot of confusion.
Simply, that me put the question in this way.
If I register a user account user1 for the panel, can it automatically create:
- domain name www.user1.lan with a web-folder
- ftp-account with some standard (or generated) password to access this folder
- mysql-user with access to phpmyadmin
Currently, I have to do it manually, it's extremely tedious, confusing (the interface is yet quite confusing, need to improve the usability) and even doesn't work (so far I couldn't make any account work like this - problems with ftp-account - it simply says 530 Login incorrect).
Probably, I don't understand something or doing something wrong.
Mon, 10/04/2010 - 16:35
that feature "all accounts in
that feature "all accounts in single step, website, ftp, mysql" is not possible at the moment in ehcp. I will consider to implement it in next versions for you (you or somebody else asked it before)
What you can do: add users as "paneluser/reseller", then, students will setup their domains themselves.
I suggest you to use Ubuntu as OS.
ftp problems basicly arises from non-clean os, non-ubuntu/debian, or because of existing ftp servers other than vsftpd.
ehcp operates with vsftpd.
i may help you to make ftp work, if you need further help.
normally, ftp does work directly, after installing ehcp. that is tested many times.
Mon, 10/04/2010 - 16:42
Thank you so much for the work you did! And amazing - you always reply so quickly and in detail!
That's admirable! Great respect!
I'll try to work with it and think about automation.
Thank you again!
Tue, 10/05/2010 - 05:08
Hello again! I'm thinking
I'm thinking about other solution without involving the hosts file.
Can I have the user websites to be accessible using IP like
where *.200 is the IP of the local EHCP server.
Currently, if I register *user1* with domain *user1* the website lies in
Can I somehow bring it to
Thanks for any help.
P.S. And yes, you were right, the FTP didn't work yesterday, because I'd tried to install another hosting panel along with EHCP. After I removed all the panels and reinstall it again, now it seems to work.
Tue, 10/05/2010 - 05:26
Creating symbolic link did it!
But probably there is an easier way to do that for within the panel? Can we configure ehcp folders in some way?
Thu, 10/07/2010 - 19:26
another idea: setup a domain
setup a domain for ex: myschool.com
write required "ip -> mysqcool.com" in hosts file of students/computers for first time.
from now on, no modificatin in hosts file will be needed.
for each student, setup a subdomain with ftp (this exist in ehcp gui)
this way, all students will be able to see their sites, and you will be able to setup student subdomains/sites more easily: subdomain & ftp in once, then setup a mysql.
for your info, in future, with user's requests i will implement all in one setup of domains & subdomains, including mysql ...
subdomain+ftp+mysql or may be +email