简体   繁体   中英

How to access XAMPP virtual host from another computer or device?

I want to access my virtual host using my phone or my other computer the problem is I cannot access my site using the server name I can only access the site using the IP address of the server. I changed the port to 7777

When I tried www.tbs.com:7777/index.php I am getting " site cannot be reached "

Virtual Host Config:

<VirtualHost *:7777>
DocumentRoot "c:/xampp/htdocs/TBSApp"
ServerName www.tbs.com
ServerAlias tbs.com
ServerAdmin webmaster@localhost
<Directory "c:/xampp/htdocs/TBSApp">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    order allow,deny
    allow from all
</Directory>
</VirtualHost>

Host Config

192.168.120.9    www.tbs.com

You need to use the ip address instead of the domain as it is a local host configuration. To use the domain across all devices you need to setup a DNS server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM