as i am a new in developing,,therefore i want to know that how can ai access virtual host of xampp while i have accessed xampp localhost on my mobile deveice(I-phone)..And I have created virtual host in
C:\\xampp\\apache\\conf\\extra/httpd-vhosts.conf
file as follow:
<VirtualHost yasir.com:80>
ServerAdmin postmaster@dummy-host2.localhost
DocumentRoot "C:/xampp/htdocs/yasir"
ServerName yasir.com
ServerAlias www.yasir.com
ErrorLog "logs/yasir.com-error_log"
CustomLog "logs/yasir.com-error_log" combined
</VirtualHost>
and also added the line
127.0.0.1 yasir.com
in
C:\Windows\System32\drivers\etc\hosts
I suspect you'll find ngrok to be the easiest solution.
Modifying your local host file will only affect that single PC, you would need to also modify the host file on your mobile (which may not be possible) and specify the external IP of your PC rather than 127.0.0.1 for what you've described to work.
Change <VirtualHost yasir.com:80>
back to <VirtualHost *:80>
first though and specify your ngrok domain as a ServerAlias
.
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.