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

前端 未结 5 1020
栀梦
栀梦 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条回答
  •  执笔经年
    2021-01-31 07:00

    Using a SSH + Putty tunnel, and thus having a 127.0.0.1 on my server, I managed to access my subdomains by doing the following on my server side:

    # nano /etc/hosts
    
    127.0.0.1  localhost.localdomain localhost
    127.0.0.1  sub1.domain.com sub2.domain.com sub3.domain.com sub4.domain.com
    

    I did not change the host file of the remote computer, and it works like a charm

提交回复
热议问题