You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Krist van Besien <kr...@gmail.com> on 2009/03/25 16:10:23 UTC

Re: [users@httpd] Redirect a whole site from port 80 to a servlet container

On Wed, Mar 25, 2009 at 3:34 PM, Florent Georges <li...@fgeorges.org> wrote:
>
> Richard Peacock wrote:
>
>> If I recall from memory the error you got means there is no
>> default document and you don't have permission to give a
>> directory listing.
>
>  :-)  Yes, if I get directly http://original.com:1234/container/app/ I get the page.  In addition, even the original website does not work anymore (which that should not change because of the new site.)

I asume you have eitehr debian or a debian derived distro like ubuntu,
from your references to a2enmod and a2ensite.

Under debian the default apache config doesn't allow proxying. See the
file /etc/apache2/mods-enabled/proxy.conf.
Thsi is to avoid you creating an open relay by accident.

So you need to enable it explicitely for your virtualhost.

Ad the following in your VirtualHost block:

<Proxy /*>
Order deny, allow
Allow from All
</Proxy>

Krist

-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Redirect a whole site from port 80 to a servlet container

Posted by Florent Georges <li...@fgeorges.org>.
Richard Peacock wrote:

> Have you tried to just have the two lines without the
> VirtualHost stuff?

>         ProxyRequests Off
>         ProxyPass / http://localhost:1234/container/ctxt/

  Well, I didn't try, but that would redirect all my original website then, wouldn't it?  That's not really the result needed :-)  But I can try just for fun.

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/

























      

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Redirect a whole site from port 80 to a servlet container

Posted by Richard Peacock <ri...@minorplanet.com>.
Have you tried to just have the two lines without the VirtualHost stuff?

        ProxyRequests Off
        ProxyPass / http://localhost:1234/container/ctxt/

Sorry if you have but it's worth a try if not ;)



-----Original Message-----
From: Florent Georges [mailto:lists@fgeorges.org] 
Sent: 25 March 2009 15:38
To: users@httpd.apache.org; Krist van Besien
Subject: Re: [users@httpd] Redirect a whole site from port 80 to a
servlet container


Krist van Besien wrote:

  Indeed, I use Ubuntu.

> So you need to enable it explicitely for your virtualhost.
> Ad the following in your VirtualHost block:

> <Proxy /*>
> Order deny, allow
> Allow from All
> </Proxy>

  Thanks!  I thus now have the following in my site file:

    NameVirtualHost www.new.com:80

    <VirtualHost www.new.com:80>
        ProxyRequests Off
        ProxyPass / http://localhost:1234/container/ctxt/
        <Proxy /*>
            Order deny,allow
            Allow from All
        </Proxy>
    </VirtualHost>

  But I still have exactly the same "403 Forbidden" error:

    Forbidden
    You don't have permission to access / on this server.

  I am not sure what other relevant info I could provide...

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/



























      

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



**********************************************************************
Privileged/Confidential Information may be contained in this 
message. If you are not the addressee indicated in this 
message (or responsible for delivery of the message to such 
person), you must not copy, distribute or take any action in 
reliance to it.
In such case, you should destroy this message and kindly 
notify the sender by reply email. Please advise immediately 
if you or your employer do not consent to Internet email for 
messages of this kind. Opinions, conclusions and other 
information in this message that do not relate to the official 
business of Minorplanet Systems plc shall be understood as 
neither given nor endorsed by it. Minorplanet Systems plc, Registration no: 3372097
Minorplanet Limited, Registration no: 4072786
Greenwich House, 223 North Street, Leeds, LS7 2AA
VAT #: 698 1438 86
********************************************************************** 
 

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Redirect a whole site from port 80 to a servlet container

Posted by Florent Georges <li...@fgeorges.org>.
Krist van Besien wrote:

  Indeed, I use Ubuntu.

> So you need to enable it explicitely for your virtualhost.
> Ad the following in your VirtualHost block:

> <Proxy /*>
> Order deny, allow
> Allow from All
> </Proxy>

  Thanks!  I thus now have the following in my site file:

    NameVirtualHost www.new.com:80

    <VirtualHost www.new.com:80>
        ProxyRequests Off
        ProxyPass / http://localhost:1234/container/ctxt/
        <Proxy /*>
            Order deny,allow
            Allow from All
        </Proxy>
    </VirtualHost>

  But I still have exactly the same "403 Forbidden" error:

    Forbidden
    You don't have permission to access / on this server.

  I am not sure what other relevant info I could provide...

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/



























      

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Redirect a whole site from port 80 to a servlet container

Posted by Florent Georges <li...@fgeorges.org>.
Krist van Besien wrote:

> Ad the following in your VirtualHost block:

> <Proxy /*>
> Order deny, allow
> Allow from All
> </Proxy>

  It seems that was the answer indeed, but it worked only when I used * instead of /*.

  So everything's fine now, thanks again to both of you!

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/


























      

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org