我有一个关于ubuntu vps的网站。我可以通过我的公共有效IP (185.211.88.62)访问我的网站,但是当本地networking上的电脑没有连接到互联网并且想要使用本地无效IP (172.16.1.103)时,它redirect到公共ip而不是工作!
我的界面:
# 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
我怎样才能configuration我的网站可以访问本地networking使用本地IP而不redirect?
nano /etc/apache2/httpd.conf显示空文件!
** sudo服务apache2状态**输出:
● 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.