ad48 ad48 - 1 year ago 128
Apache Configuration Question

Redirecting on server side in Apache

If this question is unclear or doesn't belong here/is duplicate,let me know.

I have run two servers:one (Apache) on port 80,and second (custom) on port 81.
Now,the custom server is used for some scripting and only listening on /cgi-bin/

Now,i ported my Apache server to a custom url,and added

<VirtualHost *:80>
Redirect "/cgi-bin/" ""

However,as i go on,it redirects me to localhost:81/cgi-bin/somescript on client side.
And as you know,the server on localhost can be acessed only through my computer.

It is somehow possible to redirect a request on server side instead of client ?

Answer Source

What you are looking for is not for Apache to serve a redirect, but for Apache to act as a reverse proxy.

ProxyPass "/cgi-bin/" "" should work for you.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download