Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using EHCP for internal server for training purposes
#1
Hello!

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 <b>server will not be used to access from outside</b>.

My question is: can I have <b>non-existing domain names</b> (e.g. www.server.lan, www.user1.lan, www.user2.lan...) to be used <b>within LAN</b>? 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
- mysql-database
...

Is this possible to do with EHCP?

I'll appreciate any help!
Thank you for your great contribution and passion for Open Source!

Restored from old drupal forum, for user uid:3497 username:wyxa
You may reset your password to access your new account here.
Reply
#2
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..

see you.

Restored from old drupal forum, for user uid:3497 username:wyxa
You may reset your password to access your new account here.
Reply
#3
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.

Restored from old drupal forum, for user uid:1 username:ehcpdeveloper
You may reset your password to access your new account here.
Reply
#4
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.

Restored from old drupal forum, for user uid:3497 username:wyxa
You may reset your password to access your new account here.
Reply
#5
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!

Restored from old drupal forum, for user uid:1 username:ehcpdeveloper
You may reset your password to access your new account here.
Reply
#6
Hello again!
I'm thinking about other solution without involving the hosts file.

Can I have the user websites to be accessible using IP like
http://192.168.1.200/user1/
where *.200 is the IP of the local EHCP server.

Currently, if I register *user1* with domain *user1* the website lies in
http://192.168.1.200/vhosts/user1/user1/
redirecting to
http://192.168.1.200/vhosts/user1/user1/httpdocs/

Can I somehow bring it to
http://192.168.1.200/user1/
?

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.

Restored from old drupal forum, for user uid:3497 username:wyxa
You may reset your password to access your new account here.
Reply
#7
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?

Restored from old drupal forum, for user uid:3497 username:wyxa
You may reset your password to access your new account here.
Reply
#8
another idea:
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.

then,
for each student, setup a subdomain with ftp (this exist in ehcp gui)
student1.myschool.com
student2.myschool.com

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




Restored from old drupal forum, for user uid:3497 username:wyxa
You may reset your password to access your new account here.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)

Online Shopping App
Online Shopping - E-Commerce Platform
Online Shopping - E-Commerce Platform
Feinunze Schmuck Jewelery Online Shopping