local host connection in same network - windows

I am trying to connect to my localhost from another computer. I have changed the host files to add the following at the end of the file: 127.0.0.1 privacy.local
And in my httpd-vhosts, I've added the following: DocumentRoot "/xampp/htdocs/app/" ServerName privacy.local
On my computer, I able able to access my website using privacy.local and my IP address. However, when I try to access this from my other computer, it does not work. I have also edited the host file for the other computer with my IP address and the servername.
Does anyone know why and how to fix this problem?
I am using xampp - apache.

There is nothing like a localhost in a network. You connect a host at a network adapter. The localhost is a virtual adapter to allow connections at one host without specifying the IP address of a network card. Each host has it's own localhost.
You must use the IP address of the adapter that is used to connect to the network, usually the one and only network card.
If you have DNS support you should use the host name instead of the IP address, because the IP address can change if it's assigned by DHCP.

Related

how to set an ip range for a virtualhost in host file

I want to let another person on my LAN see my Virtual host. I took some steps and now he can see my localhost when he enters my IP as an URL in browser. he couldn't see my virtualhost (shop.test) yet. so I edited his host file. I added my IP(192.168.1.3) tab shop.test. now he is able to see my vhost too. but there is a problem. my IP is Dynamic and for some reasons it should be this way. how can I use a range IP for shop.test in host file? or is there any other way for the purpose?
and what is the meaning of ::1 localhost in host file?
::1 localhost in your HOSTS file is the equivalent of 127.0.0.1 localhost but for the IPV6 address range. It is the loopback address for IPV6 like 127.0.0.1 is.
Modern browser will likely as not attempt to use the IPV6 range by default is they can
The PC running WAMPServer should be configured to use a static IP Address. Obviously it should not move or as you see it makes it difficult for other users to find it.
See this site for instructions on how to configure your PC with a static IP Address

How to make server inside vm have same ipaddress even though we change network

I have windows server installed in a vmware with domain configured. I had configured a website in iis and kept network adapter as bridged in vmware and is able to access website outside vmware on my local computer.
Problem is when i change my network on local server, we are not able to access website because earlier network range configured was different. For eg : first time it was in 192.168.Xx.XX series after changing network entire ipaddress of local computer got changed to 10.02.XX.XX
Need to know how we can achieve this.
You can assign another VM adapter to Local server and assign him static IP of your subnet or add a second IP to exiting network Adapter. After adding static IP of your subnet to local server, you can assign this IP to you IIS site and can access it from all of your network.
You can also configure NAT/bridge connection again on your server Vmware network adapter as you did earlier (what is the issue?).
If you dont want to assign ip of your local network to server vm, you can also assign second ip address to your host machine network adapter( If clients are not many).
you should also adjust the website's or VM's ip matching your network segment.
so if your network subnet is already 10.x.x.x change your websites ip to 10.x.x.x . or if you dont want to change your website's ip then you should configure routing or NAT

Xampp port not working

I've got xampp installed on ubuntu. The port which I'm using is 3000. Let's say that my IP address is 123.123.123.123
When from another device I'm checking port 3000 for page 123.123.123.123 it's saying it is open.
When I'm opening page 123.123.123.123:3000 on my computer it's working. However when I'm opening 123.123.123.123:3000 on another device it's not working.
How is it possible? (The port is open)
*it looks like client is being redirected to localhost.
Let's say you are running Xampp server (apache) on port 8000. In this case, your local server access address would be localhost:8000/ or 127.0.0.1:8000/
Let us consider your ip address to be 123.123.123.12. So in your LAN network, the server access address would be 123.123.123.12:8000/. So the address you have used will work in case of devices connected in a LAN network.

Hosting Website to local in IIS

I am able to host website in IIS 8 but not with ip add. The binding with ip and browsing the site in chrome gives 'ERR_NETWORK_ACCESS_DENIED'
http://localhost - works
http://10.111.148.133/ - does not work.
Seems you are using your public IP.
You can browse using your local IP address. Your local IP address should be some thing like 192.168.xxx.xxx .
You can check your local Ip address using the following command in command prompt.
ipconfig/all
if you want to access your site using public ip, then you need to port forward from your public IP to localIp by setting the DMZ Host in your router.
Along with the above answer, try going through your Firewall settings on the host computer and enabling anything related to IIS or port 80.
You can easily figure out if your antivirus or firewall is the issue by temporarily disabling it.
However, I think your issue is that you grabbed your public IP address, off whatsmyip.com or something, you just need to exec ipconfig to see what your local IP is.

Do we have to buy a domain to serve Bugzilla?

I tried putting my IP from whatismyip.com in the urlbase of Bugzilla but it did not work. I wasn't able to create a new account for my team mate, and he wasnt able to access the server by typing the my ip address in his browse. And surely, when I connect again, my IP address will change. Do we have to buy a www address to host Bugzilla?
You can setup a dynamic dns service, for example via http://www.dyndns.com or http://www.no-ip.com or http://freedns.afraid.org to solve the changing ip problem without buying a domain (or buying a domain as well, but it's not a requirement).
But the real problem is that your team mate cannot access the server via the current IP address which points to either a misconfiguration of the webserver (listening only on localhost?), to a firewall in between, or most likely, that port forwarding isn't set up in your router for requests coming to your external IP address to be forwarded to the machine where you have Bugzilla set up. Additionally, you must set the urlbase to your local IP address, not to the external IP address, as blak3r says.
Check http://www.portforward.com for instructions on how to do port forwarding. But don't forget that everything mentioned has to be working:
Web server listening to outside requests: This can be tested from the same internal network via the local network IP address (what you see typing in a command line console ipconfig in Windows and ifconfig in Linux). If you can connect from a different machine on the same network via the local IP address, this is solved.
Firewalls (in router and the webserver machine) accepting connections to the web server port: For firewalls in the web server, the same test as above covers it.
Port forwarding so the router forwards the requests received on the web server port to the web server machine: This gets tested in the same way as firewalls in the router, that is, you must have your friend (or yourself from the house of your friend) try to connect to the dyn dns name set up or to the external IP as reported by whatsmyip.org.
This is all assuming your test mate is not on your same network, if he is, just using the local IP address (shown via ipconfig or ifconfig) instead of the external IP address and making sure the first step is covered (web server listening to outside requests) should be enough and nothing else is needed!
You most likely do not have your port 80 forwarded to your machine which is the reason he cannot connect when using the IP that was returned from whatismyip.com.
Assuming you're on a windows box... do
Start->Run->cmd then type
ipconfig
If your address starts with 192...* or 10...* this is your Local Area Network (LAN) IP. If this is the case, then your isp provided you with a router. Look for a setting called port forwarding or "application setting" which allows you to forward all incoming traffic on your router to a particular IP address. Go into your router's configuration settings and make sure port 80 (and maybe 443 if you're using ssl are forwarded to your local ip).
The other problem you mentioned is you do not have a static IP. This is a common problem and no you do not need to buy an address. There are several sites which can provide you a free dynamic dns host. Try no-ip.org.

Resources