Dear Stuart,
yes, you are right, I need to be more precise, however, I am not really firm with Linux, Apache and HTML code or server settings. So I try to explain what I know or think.
1. I would like to create a virtual host for www data on my Zentyal server. My Zentyal server is behind a firewall and not directly connected to the internet. I use the route as a gateway. The name of the virtual host is www.<host>.dyndns.org, it does contain just my private homepage. This one shall be open to the public, Zentyal provides everything I need for that.
2. As my router forwards any requests on port 443 and 80 to my Zentyal server. Therefore I transfered the admin dashboard login from 443 to a different port. Additionally I created a second virtual host, mailservice.<host>.dyndns.org and forced it to SSL via Zentyal Dashboard settings using port 443. This virtual domain host ist bond to Zarafa: I can access my Zarafa Mail account via a SSL secured web interface. Additonally, I can take advantage of Z-Push using mobile devices.
3. Now the first problem occurs: If someone enters <host>.dyndns.org (simply leaving out www. OR by just writing <nonsens>.<host>.dyndns.org), he is redirected to the default Web page reading "It works .." from Zentyal default. Badly, if someone adds /phpmyadmin or /cgi-bin/apcupsd/multimon.cgi, one can access my MySQL server (if he has the passwords) or one can see my UPS running parameters. The MySQL server is open to brute force attacks from WAN ..... Therefore I would like to prohibit the WAN access to theses directories, while the /~userpages shall still be accessible. I think the best way for that is a .htaccess file in the respective root directory (which is in my opinion /var/www/ , isn't it?) Additionally, I will change the config.inc.php file in order to allow just LAN access. ALTERNATIVELY, the solution as I describe i 4) might be adequate, too, simply following a LINUX wisdom: All roads lead to Rome
4. I would like to provide an Intranet to LAN users, so I would set up a third virtual host on Zentyal, e.g. intranet.<host>.dyndns.org. Here I found the cited Zenyal documention. If I suppose right, I can add user customized Apache configuration data, e.g.
<Directory /srv/www/intranet.<host>.dyndns.org>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order deny, allow
Allow from 172.17.0.0
</Directory>
It seems that I can store a file containing the respective code (what is the required name) simply in /etc/apach2/sites-available/user-ebox-<virtual-domain>/ ... no need to change the .mas file of the zentyal configuration....
5) I have no Idea on how to handle my last Idea: I do run the sage project on a different phyiscal maschine, just for some calculations. Sage is an interactive web-based calulation solution for math. It does provide a http web server where you can enter and solve equations etc. As all http requests are forwared from my router to the Zentyal server, it would be great if Zentyal recognizes the virtual host sage.<host>.dyndns.org and forwards it to the LAN maschine where the sage project is running. I think, this can be done by the config file, as suggested in 3), tool
So, I hope I made my problems more clear and I would appreciate any help, hint and tip.
TIA
Thorsten