F
F
facha2013-09-19 19:04:25
Apache HTTP Server
facha, 2013-09-19 19:04:25

How to open access to the site in the local network through apache

Hello everyone,

There is a site in the local network (web muzzle of some piece of iron). There is apache on the same network, but in addition with a public IP visible from the Internet. I would like to provide access to the local site from the Internet through apache.

The only option I found is mod_proxy.:
ProxyPass /foo http://192.168.10.10 ProxyPassReverse /foo http://192.168.10.10

I go to the server in the /foo folder - it seems to work. The home page of the local site appears. But my “proxy” can no longer handle the authorization form. After a post request from the authorization form, apache no longer forwards anything to the site, but looks for the desired url on its own, and, finding nothing, returns an error.

Whether it is possible to bypass this problem somehow? Maybe I'm digging in the wrong direction? How do web anonymizers bypass this moment?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
S
shadowalone, 2013-09-19
@shadowalone

do not bind proxypass to a folder, make a separate domain, and proxy it to a piece of iron.

A
Alexander, 2013-09-20
@avorsa

I would like to provide access to the local site from the Internet through apache .

the key point, why let it through apache?
Let the router at the input do this.

M
mayorovp, 2013-09-20
@mayorovp

Give an example of the form that the proxy does not master. I predict that the path to the action from the root of the site is clogged there, and not relative. If this is true, then there are three solutions to the problem:
1. Change the forwarded site so that all links in it are relative. (Impossible on modern sites with advanced routing, but once upon a time it was considered good form).
2. Change the forwarded site so that all paths to its pages start with /foo - for many CMS such modification is supported out of the box, and with a high probability such a modification will be quite simple for sites on Tomcat or ASP.NET
3. Select for the forwarded site separate port or virtual host.

D
demimurych, 2013-09-19
@demimurych

If on a machine that sticks out to the outside world, Apache is needed only to give access to the site from LAN, then you can completely refuse it.
It is enough to forward port 80 to a machine inside the local network using iptables.
Or, if Apache is still needed, forward some other port (for example, 8080). As a result, access from the outside world to the site, which will be provided in LAN upon request, is the address of the machine sticking out to the outside world: 8080

D
demimurych, 2013-09-19
@demimurych

del

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question