Re: Strange Apache behavior while using website as proxy server (without installing mod_proxy)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 29, 2008 at 2:52 PM, Ravi <ravikapoor101@xxxxxxxxx> wrote:
>
>  I have a strange problem and I cannot find any documentation around it.
>  I have two virtual host defined as follows:
>
>  NameVirtualHost *
>
>  <VirtualHost *>
>         ServerName www.mydomain.com
>         DocumentRoot C:/mydomain/www
>  </VirtualHost>
>
>
>  <VirtualHost *>
>         ServerName proxy.mydomain.com
>         DocumentRoot C:/mydomain/proxy
>  </VirtualHost>
>
>
>  Now I configured www.mydomain.com as http proxy server in my browser and
>  go to a random website website http://www.randomsite.com/index.html
>
>  1. Browser sends proxy request to www.mydomain.com and apache loads
>  http://www.mydomain.com/index.html. I found no explanation of this
>  behavior. I could not find any documentation on how it handles proxy
>  requests if mod_proxy is not installed.
>
>  2. Secondly if I configure proxy.mydomain.com as proxy server, apache is
>  still loading the website from http://www.mydomain.com/index.html
>  instead of http://proxy.mydomain.com/index.html. Any idea how to fix this?

The webserver is doing exactly what you told it to do. You told it to
serve pages from C:/mydomain/www for any request coming in, and this
is what it does.
To know more about virtual hosts read the documentation.

In order to use apache as a proxy a lot more configuration is needed.
It is obvious from what you have shown us so far that you haven't even
started configuring your apache as a proxy, so why would it behave as
one?

Start by reading the documentation here:
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html

If you want to use apache as a proxy and as a webserver at the same
time you will probably need to dedicate a separate port to the proxy.

Krist

-- 
krist.vanbesien@xxxxxxxxx
krist@xxxxxxxxxxxxx
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux