I have a website on ubuntu vps.I can access my website through my public valid IP (185.211.88.62) but when computers on local network are not connected to internet and want use local invalid IP (172.16.1.103) it redirects to public ip and not works!
my interfaces:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto ens32
iface ens32 inet static
address 172.16.1.103
netmask 255.255.255.240
network 172.16.1.96
broadcast 172.16.1.111
gateway 172.16.1.97
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 172.16.1.97
dns-search xcv.ikl.com
how can i configure my website be accessible from local network using local ip without redirect?
nano /etc/apache2/httpd.conf shows empty file!
** sudo service apache2 status ** output:
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: active (running) since Sun 2017-11-12 05:19:01 EST; 1min 52s ago
Docs: man:systemd-sysv-generator(8)
Process: 24060 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
Process: 24086 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)
Tasks: 55
Memory: 6.3M
CPU: 135ms
CGroup: /system.slice/apache2.service
├─24104 /usr/sbin/apache2 -k start
├─24106 /usr/sbin/apache2 -k start
└─24107 /usr/sbin/apache2 -k start
Nov 12 05:19:00 student systemd[1]: Stopped LSB: Apache2 web server.
Nov 12 05:19:00 student systemd[1]: Starting LSB: Apache2 web server...
Nov 12 05:19:00 student apache2[24086]: * Starting Apache httpd web server apache2
Nov 12 05:19:01 student apache2[24086]: *
Nov 12 05:19:01 student systemd[1]: Started LSB: Apache2 web server.