Access two different LAN web servers using same Public IP Address - xampp

I am running websiteA.com on xampp server "A" and websiteB.com on xammp server "B"
I can connect static IP 123.123.12.12 to access websiteA.com but I want to use same ip to browse websiteB.com.
I forwarded my static IP i.e 123.123.12.12 to lan IP 192.168.01.101:8888(for website A.com)
Now I want to forward same static IP on different lan IP 192.168.01.105:8080 (for websiteB.com)

Related

Access virtual server address remotely without using server's IP address

This is in reference to the question posted here:
Access virtual host from another machine over LAN
The solutions in that link are to access virtual address through main server's IP address. However is it possible to access just through the virtual domain address?
For example : www.project2.com
Instead of using server's IP address : xxx.xxx.xxx.xxx

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

local host connection in same network

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.

Use local HTTP proxy over the internet

I have set up a local proxy server on Ubuntu Server (I used Squid). Now, when I'm on the same LAN of the server and when I connect to 192.168.1.XXX:8888 I can use the proxy. But can I use it over the internet? I have already tried connecting to the public IP address of my server but it didn't work. Thank you.
Your server must have a separate public IP address, or you have to use a specific port on your current IP and do a port redirection for incoming traffic on public IP and this specific port to the proxy server.

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