Apache Virtual Host (Subdomain) access with different computer on LAN

前端 未结 5 1089
栀梦
栀梦 2021-01-31 06:40

I am currently trying to configure the Virtual Host (Subdomain) of my Apache HTTP Server so it can be accessed with another computer on my LAN. The current setup of Apache with

5条回答
  •  Happy的楠姐
    2021-01-31 07:03

    Unless I'm missing something, you'll need to either set up DNS entries, or add entries to the /etc/hosts file of each computer accessing the server.

    localhost is an entry that exists in everyone's /etc/hosts file by default, always pointing to 127.0.0.1. Without adding a /etc/hosts entry, developer.localhost doesn't exist, and prefixing an ip address with a subdomain won't work at all.

提交回复
热议问题