Remotely access the Apache server installed on the VM from a computer in the local network


financial reporting rate

I want to access Apache from a computer inside the network, the problem is that Apache is running on a virtual machine:

chart

(  [A: VM Running Apache] -- [B: Actual machine]  ) ------ [C: Actual machine]

IP:

A: 192.168.55.55
B: 192.168.1.25

I can access A normally from B, but not from C. (After a while I got a message saying "The connection to the server timed out").

B: Network information

enter image description here

PD: The reason Apache is inside the VM is because I'm using Vagrant, not sure if it has anything to do with it, but I thought I'd mention it anyway.

police

This is how I do this on my home network.

On the computer that is actually running Vagrant, edit the Vagrantfile and move the port forward 8088 (or whatever port number you choose) from the host (as you call "Actual Machine") to port 80 on the Guest (as you call it) "VM Running Apache") it).

Do a normal idling and you should see the port forwarding happen on startup. I personally have about 8 virtual hosts running on my Vagrant box, each with their own hostname. I edited the hosts file on the host machine (machine "B" above) to point these hostnames to the ip of the "Vagrant" box. It works just fine, I can put something like mysite.dev in the address bar and the site will start on my local machine.

Now, to make it work on another computer within the same subnet as the host, you will need to edit the hosts file on the second computer. Point the hostname ( mysite.dev for my example ) to the actual IP address of the host. This will forward any instance of mysite.dev to the computer you marked as "B" in your question. The only problem is that this just points to the standard port 80, like any normal web page. You want this traffic to actually reach the machine "A" in your question. So instead of just putting mysite.dev in your browser's address bar, put mysite.dev:8088 (or whatever port number you chose to forward to computer "A" earlier).

Traffic from "C" will now be sent to machine "B" because the hosts file tells it to go there, and the additional ports you add to the address force machine "B" to forward traffic to the port on machine "A" 80 . Machine "A" receives the request and returns the data to machine "B", which then forwards it back to machine "C".

The end result is that machine "C" sees the page returned from machine "A".

Hope to summarize.

Good luck!

00

Related


Apache server allows access from local network

Matthew Meehan optional I've installed fedora server but can't seem to get web requests through it. I can ping it, and as far as I can tell, apache is functioning fine on the computer. I listen on httpd.conf as Listen *:80 and the server name is ServerName 19

Apache server allows access from local network

Matthew Meehan optional I've installed fedora server but can't seem to get web requests through it. I can ping it, and as far as I can tell, apache is functioning fine on the computer. I listen on httpd.conf as Listen *:80 and the server name is ServerName 19

Alfresco, access server from local network

Ascend I am trying to perform in the open air. It is installed on the local server. Tomcat is the web server used by Alfresco to provide access to the web panel. The default ip is: 127.0.0.1:8080; Now, I want to gain access from another local computer. The IP

Access the local server from other computers on the network

learner I have a server on my computer and it is set --address=0.0.0.0up so that it can be accessed from other computers in the network. Now my question is, what address do other computers type as they can access the server? On the managed computer, I can do i

Alfresco, access server from local network

Ascend I am trying to perform in the open air. It is installed on the local server. Tomcat is the web server used by Alfresco to provide access to the web panel. The default ip is: 127.0.0.1:8080; Now, I want to gain access from another local computer. The IP

Alfresco, access server from local network

Ascend I am trying to perform in the open air. It is installed on the local server. Tomcat is the web server used by Alfresco to provide access to the web panel. The default ip is: 127.0.0.1:8080; Now, I want to gain access from another local computer. The ser

Access the local server from other computers on the network

learner I have a server on my computer and it is set --address=0.0.0.0up so that it can be accessed from other computers in the network. Now my question is, what address do other computers type as they can access the server? On the managed computer, I can do i

Alfresco, access server from local network

Ascend I am trying to perform in the open air. It is installed on the local server. Tomcat is the web server used by Alfresco to provide access to the web panel. The default ip is: 127.0.0.1:8080; Now, I want to gain access from another local computer. The ser

Access a local website from another computer in the same network

Ting Wang I recently wrote a web in Flask and set host='0.0.0.0', port=5000. I can access the network using 127.0.0.1:5000 or localhost:5000 or 192.168.1.12:5000 (my IP), but I can only do this with the computer running the code. How can I access the website f

Access a local website from another computer in the same network

Ting Wang I recently wrote a web in Flask and set host='0.0.0.0', port=5000. I can access the network using 127.0.0.1:5000 or localhost:5000 or 192.168.1.12:5000 (my IP), but I can only do this with the computer running the code. How can I access the website f

Unable to access Apache web server outside/inside local network

Onemic My apologies if any technical terms are used in the wrong way. I'm still new to Linux/Networking I've been trying to solve this problem for over a week now, and all the related questions from other people haven't helped me. I recently set up a webserver