[ale] Apache2 Proxy Question
Brian Mathis
brian.mathis+ale at betteradmin.com
Thu Jan 19 15:26:19 EST 2012
Those 2 things are completely different. A redirect will tell the
browser to use the new URL, and you should see that in the browser
address bar. The proxy statements keep the same URL, and apache
requests the data from the other server as a middle-man, and then
returns it to the client.
These are used for very different situations. For most people, you
don't want to have the port numbers in the URL, especially
non-standard ports like 8080. This will work OK for a home/hobbyist
install, but should be avoided in any professional setting. Not only
is it ugly, it can cause problems such as access through firewalls.
The proxy method avoids most of these issues, and allows you to have a
front-end server on a single IP that acts as a broker to multiple
servers on the backend.
Your original request was asking for the proxy method, even though you
called it a "redirect". This may have led you down the wrong path on
your googling.
❧ Brian Mathis
On Thu, Jan 19, 2012 at 1:50 PM, Wolf Halton <wolf.halton at gmail.com> wrote:
> Thanks Brian,
> I thought it would end up being something simple.
> I got it to work as a simple redirect with
> Redirect 301 / http://servername.org:8080/redmine
> and that looks pretty smooth.
>
> It cuts off using the port 80 site directly, but solves the main problem,
> which was getting access to redmine.
>
> -Wolf
>
>
> On Thu, Jan 19, 2012 at 10:37 AM, Brian Mathis
> <brian.mathis+ale at betteradmin.com> wrote:
>>
>> This is not a problem with DNS, it's your apache config. The URL in
>> the ProxyPassReverse should be the URL that the web browser will be
>> accessing; you have it set to the internal server.
>>
>> It should be something like this:
>>
>> ProxyRequests Off
>> ProxyPass /redmine http://127.0.0.1:8080/redmine
>> ProxyPassReverse /redmine http://your.web.site/redmine
>>
>>
>> ❧ Brian Mathis
>>
>>
>>
>> On Wed, Jan 18, 2012 at 10:09 PM, Wolf Halton <wolf.halton at gmail.com>
>> wrote:
>> > I want to have a complicated web address
>> > http://sub.example.org:8080/redmine
>> > be accessible at http://sub.example.org/redmine
>> > This should be a simple redirect.
>> > the following code is what I find at apache.org and is basically what I
>> > am
>> > seeing everywhere.
>> >
>> > ProxyRequests Off
>> > ProxyPass /redmine http://127.0.0.1:8080/redmine
>> > ProxyPassReverse /redmine http://127.0.0.1:8080/redmine
>> >
>> > What it gives me when I type http://sub.example.org/redmine in the
>> > address
>> > bar of a browser is
>> > http://sub.example.org/redmine/:8080/redmine
>> > a broken nonexistent place.
>> >
>> > I tried the code above in the virtual server and in the mod_proxy
>> > configuration and failed the same way with the code in either file. At
>> > least the failure is consistent.
>> > /etc/apache2/sites-available/default
>> > /etc/apache2/mods-available/proxy.conf
>> >
>> > I set the "A" record at the registrar (Network Solutions) The base url
>> > "example.org" points to a different ip address.
>> > This server hostname = REDMINE-01 has 2 web servers running. One is the
>> > basic install apache2 listening at port 80, which I would like to be
>> > able to
>> > keep if possible.
>> > The other server is a Bitnami installed system listening at port 8080.
>> >
>> > 1.) should I set the other web server to listen at both ports and turn
>> > off
>> > the apache2 server sitting on port 80?
>> > 2.) could this be a cname issue that I could adjust at the registrar's
>> > dns
>> > settings?
>> > 3.) is it really a different problem and I have been trying to fix the
>> > wrong
>> > problem for the last 11 hours?
More information about the Ale
mailing list