Multiple virtual hosts and port redirection

webserver
virtualhosts
v7

(Thorsten) #1

NethServer Version: 7.5
Module: webserver

Sorry, I do not get that from the manuals. Maybe this is up to my technical english, so I kindly ask for some help.

based on my.tld I would like to create some vhosts, such as:

mail.my.tld
www.my.tld
chat.my.tld
dms.my.tld
piwik.my.tld
bib.my.tld

Now I would like to redirect open port requests on my router to Nethsever.
chat.my.tld > mattermost
mail.my.tld -> nethserver-IP\webtop (or sogo)
dms.my.tld -> green-network-IP-running_dms.my.tld
piwik.my.tld -> piwik installed via ftp on nethserver apache
www.my.tld -> drupal installed via ftp on nethserver apache
bib.my.tld -> gren-network-IP-running_calibre.my.tld

Is there good (maybe german manual)

TIA
Thorsten


(Thorsten) #2

found the first one for reverse proxy … it is an own module within nethserver …


(Markus Neuberger) #3

For Mattermost you have to set a virtual host via Nethserver web UI:
http://docs.nethserver.org/en/v7/team_chat.html#configuration

Webtop and sogo have an e-smith db prop to set a virtual host/public URL:
http://docs.nethserver.org/en/v7/webtop5.html#change-the-public-url
http://docs.nethserver.org/en/v7/sogo.html#esmith-database

The others should work with reverse proxy.


(Thorsten) #4

Dear Markus,

for webtop:
Do I need to create an Virtual host first?
Following an Example, I do want to change to say “mail.mydomain.tld” without /webtop. This should work, right?

TIA
Thorsten


(Markus Neuberger) #5

No, virtual host is not needed.
I didn’t test it but it should work…


(Thorsten) #6

Hi Markus,

no, it does not work as expected. Following the procedures described herein:

http://docs.nethserver.org/en/v7/webtop5.html#change-the-public-url

does not allow to change the host to http://mail.mydomain.tld without /webtop.
mail.mydomain.tld ends up on the default www host.

Is there any other option?
TIA
Thorsten


(Markus Neuberger) #7

It should work with a reverse proxy virtual host:

EDIT:

Sorry, doesn’t work, you cannot login :unamused:

EDIT2:

Workaround via vhost and redirect:

You may create a virtualhost with the virtualhost module:

Create a /var/lib/nethserver/vhost/webtopvhost/index.php that redirects to the webtop URL:

<?php
   header ("location: https://yourdomain.tld/webtop");
?>

Set apache as owner for index.php:

chown apache:apache /var/lib/nethserver/vhost/webtopvhost/index.php