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

前端 未结 5 1024
栀梦
栀梦 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:20

    Ok, I figured it out, here are the configuration if anyone else is looking for this:

    ==================================================================================

    Machine A (Apache HTTP Server): httpd-vhost:

    NameVirtualHost *:50080
    
    
        DocumentRoot "C:/www/HTTP"
        ServerName localhost
        ServerAlias alias 
    
    
    
        ServerAdmin administrator@development.localhost
        DocumentRoot "C:/www/HTTP/development"
        ServerName development.localhost
        ServerAlias development.phoenix 
        ErrorLog "logs/development.localhost-error.log"
        CustomLog "logs/development.localhost-access.log" common
    
    

    hosts:

    127.0.0.1 development.localhost
    
    127.0.0.1 alias
    127.0.0.1 development.alias
    

    ==================================================================================

    Machine B (Guest Machine): hosts:

    10.0.0.10 alias
    10.0.0.10 development.alias
    

    From the second machine, you should be able to access with "alias" and "development.alias"

提交回复
热议问题