Cannot access wordpress hosted on localhost from my phone - wordpress

What I have done:
Created an inbound rule in my firewall on port 80 for requests from local network
Modified Apache's httpd.conf and httpd-vhost.conf to allow requests from local network
Changed the Wordpress Address (URL) and Site Address (URL) from localhost to my machine's LAN IP
Connect my phone to the wifi of the same router as my computer
What I can access from my phone:
My WAMP server homepage
The sample directory I created in my server's root directory
My problem:
Whenever I try to access the wordpress directory in my server's root directory from my phone the URL gets changed from my machine's IP address to 'localhost' and I am given the error message that the site cannot be reached. When I open my Wordpress site from my computer it is showing my IP without changing it to localhost. Any advice will be greatly appreciated.

It’s because your pc knows the domain name for the IP address. You can check hosts file under C:\windows\System32\Drivers\etc\hosts
Your phone also should know where to ask that domain name. And I advice you to set up a domain in your local. That could solve the problem

Related

How to manage default subdomain for a given IP address. WHM CP

My client's security team noticed that their website's IP address resolves to the DEV domain and not the LIVE domain.
I other words -
https://99.999.999.999 (if you put it in the browser) resolves to https://dev.example.com instead of https://example.com
Is there a way to specify the default domain/subdomain that the IP address resolves to using WHM CP? They'd like it to resolve to https://example.com
Both websites would still use the same IP.

How to do i use wamp server to host godaddy domain

So i have bought a domain from godaddy
I have installed wamp got it running so if i put my local ip it goes to my website
i have port forwarded my ip
Now how do i use my domain to access my website hosted in wamp
I have done this also today. How do I host my own website with my purchased domain name from my own laptop?
Edit: I can confirm that if i type my ip in it works good on any wifi or data
To use the domain purchased now you need a DNS server. So that I link your domain name with the IP of your apache server.
If you have a fixed IP. See if you can assign this IP from the Godady panel.
If you have a dynamic IP, you must use a third-party service that may be able to link the dynamic IP and update it for your domain name.
There are many services, but I recommend: https://dyn.com/dns/ or https://freedns.afraid.org/

wordpress web server WAN/LAN connection error

i made web server for WordPress on raspberry pi (low cost linux single board computer). In local network everything is ok. i bought static ip from my ISP and i forwarded 80 port of raspberry to global network. while trying to connect WordPress by global ip from external network (e.g. smartphone with 4G) pages are too slow(images not shown and theme is basic).
To solve that i change wordpress site url&wordpress url from local ip to global ip. at this time i can connect from external network with global ip too fast, but i cannot connect it by desktop computer which is on local network(browser going to router(huawei HG658)main page when global ip was entered) so that i can’t use dashboard, write posts anything else. How can i solve this ?
I solved the problem. i bought domain. i forwarded it to my static ip. than i added below settings in rpi /etc/apache2/sites-enabled/001-local
<VirtualHost *:80>
DocumentRoot /var/www
ServerName myuniquename.com
ServerAlias www.myuniquename.com
</VirtualHost>
i changed wordpress site&wordpress adress url to my domain. than i configured hosts file(c:\Windows\System32\Drivers\etc\hosts) on my desktop.
192.168.1.31 myuniquename.com
192.168.1.31 www.myuniquename.com

how to call a website from cmd using a non registered domain name?

Usually When you ping a website (e.g Google.com) it replies with a specific IP
My question is: Is there anyway where you can call a website and replies with an IP you have set manually like 1.2.3.4
meaning if I ping google.com from my pc it will reply with 1.2.3.4
You can do this by adding the domain and IP to your host file. What OS are you running?
On Windows Server 2012 you will find the host file on %systemroot%\system32\drivers\etc
Add your domain and IP like this
64.49.219.194 www.domain.com
Try ping again.

How to mask my local ip with an user friendly name?

I am developing a web application, I've made the project in my localhost, but the net users need to access to my project and I dont want to give them a non-friendly ip address, so I wanna user acces with a name for example
http://myproject/
If this is on a local network you can edit the hosts file on your computer to "mask" the ip on the network. Of course you'll have to change the project to use the network ip instead of localhost.
go to MyComputer>Drive C>Windows>System32>Drivers>etc>
Open hosts file
After opening the “hosts” file that will look as below. Here you can add your favourite domain name with the same IP address as I have added the ebaytemplate.com with the IP of 127.0.0.1.
now run you localhost and in browser type ebaytemplate.com you localhost will run :)

Resources