0

Problem: Accessing two different web servers from the web.

Set up:

Machine 1 - 192.168.20.100

i5 Windows 10 Home running various software and PuTTy for acces to the other boxes.

Machine 2 - 192.168.20.200

RPi2 Rasbian, LAMP stack, Web pages, Minecraft server ZoneMinder (test) @ v1.28.100.

Machine 3 - 192.168.20.210

i7 dual boot Windows 10 Pro and ubuntu 14.0.1 LTS desktop with LAMP stack, TeamSpeak3, ZoneMinder (production) @ v1.28.109.

All hooked to a network through a Gigabit Router and a Cable Modem.

Web address: domainname.nz

Software setup

Apache2

Machine 2 - 192.168.20.200

/etc/apache2/sites-available/domainname.nz.conf

<VirtualHost *:80>
   ServerName domainname.nz
   ServerAlias www.domainname.nz
   DocumentRoot /var/www/domainname.nz/public
</VirtualHost>


<VirtualHost *:80>
   ServerName zm.domainname.nz
   ServerAlias www.zm.domainname.nz
   ProxyPass / http://192.168.20.210/zm/index.php
   ProxyPassReverse / http://192.168.20.210/zm/index.php
</VirtualHost>

Machine 3 - 192.168.20.210

/etc/apache2/sites-available/zm.domainname.nz.conf

<VirtualHost *:80>
   ServerAdmin [email protected]
   ServerName zm.domainname.nz
   DocumentRoot /var/www/zm.domainname.nz
   <Directory>
       Options Indexes FollowSymLinks MultiViews
       AllowOverride all
       Order allow,deny
       allow from all
            Require all granted
   </Directory>
   ErrorLog ${APACHE_LOG_DIR}/error.log
   CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Hosts Files

Machine 2 - 192.168.20.200

127.0.0.1       localhost
1               localhost ip6-localhost ip6-loopback
fe00::0         ip6-localnet
ff00::0         ip6-mcastprefix
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

127.0.1.1       MineCraftPi

192.168.20.200 domainname.nz
192.168.20.200 www.domainname.nz

192.168.20.210 zm.domainname.nz
192.168.20.210 www.zm.domainname.nz

Machine 3 - 192.168.20.210

127.0.0.1       localhost
127.0.1.1       M91p

192.168.20.210 zm.domainname.nz
192.168.20.210 www.zm.domainname.nz

192.168.20.200 domainname.nz
192.168.20.200 www.domainname.nz

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Problem:

It would seem that everything works fine when accessed from within the local network but I can't see the web pages and ZM (test) on Machine 2 from the web (work machine) and mobile phone.

Having looked around I can't find a detailed step-by-step explanation from start to finish of how all this should be set up.

Can anyone point me in the right direction to solving the access to both machines from the web as well as maintaining the access from the network?

Ta Steve

4
  • So... is your problem that you want to access all the machines in some way outside your local network?
    – Wilf
    Nov 30, 2015 at 7:50
  • Just the web pages and ZM on Machine 2 and 3 respectivley
    – Steve W
    Nov 30, 2015 at 7:51
  • Ok, how have you set up port forwarding etc? Also BTW having the local network open to the WWW generally means you have to really careful with security stuff
    – Wilf
    Nov 30, 2015 at 7:53
  • There's a few forwarded through the router to various bits and pieces but only 192.168.20.200:80 for the web, (looking at https with Let's Encrypt) with a couple for minecraft, some cameras, and a couple for TeamSpeak3, All are password protected.
    – Steve W
    Nov 30, 2015 at 8:01

1 Answer 1

0

Ok seems to all be fixed thanks. I managed to sort a subdomain with the ISP and with a few minor changes to directories and content managed to get everything to work. Steve

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .