[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Proxying junebug through Apache

Nick Coyne

9/12/2007 1:03:00 PM

I'm trying to configure Junebug to be served through Apache following
the instructions at http://www.junebugwiki.com/Junebug_In....

The only change I've made from the std Apache config is to serve the
wiki on port 8000 like so
<Virtualhost *:80 *:8000>

However when I visit http://mysite:8000 I get a "Unable to connect"
message in Firefox. The app is served fine on its default port of 3301.

Any ideas? I'm not too clued up on Apache config.

thx
Nick
--
Posted via http://www.ruby-....

8 Answers

Phillip Gawlowski

9/12/2007 1:20:00 PM

0



> -----Original Message-----
> From: list-bounce@example.com [mailto:list-bounce@example.com] On
> Behalf Of Nick Coyne
> Sent: Wednesday, September 12, 2007 3:03 PM
> To: ruby-talk ML
> Subject: Proxying junebug through Apache
>
> I'm trying to configure Junebug to be served through Apache following
> the instructions at http://www.junebugwiki.com/Junebug_In....
>
> The only change I've made from the std Apache config is to serve the
> wiki on port 8000 like so
> <Virtualhost *:80 *:8000>
>
> However when I visit http://mysite:8000 I get a "Unable to connect"
> message in Firefox. The app is served fine on its default port of 3301.
>
> Any ideas? I'm not too clued up on Apache config.

Is apache listening on :8000, too? There should be a file in the apache.conf file similar to "Listening". If you add :8000 there, you might be successful.

--
Phillip Gawlowski


Nick Coyne

9/12/2007 1:46:00 PM

0

Thanks. That moved me forward a bit.

Now I'm receiving the error:
Forbidden

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

Looking in the junebug error log I see a line which says:
[warn] proxy: No protocol handler was valid for the URL /. If you are
using a DSO version of mod_proxy, make sure the proxy submodules are
included in the configuration using LoadModule.

Not sure what I should be checking next?

thx
Nick


Phil wrote:
>> The only change I've made from the std Apache config is to serve the
>> wiki on port 8000 like so
>> <Virtualhost *:80 *:8000>
>>
>> However when I visit http://mysite:8000 I get a "Unable to connect"
>> message in Firefox. The app is served fine on its default port of 3301.
>>
>> Any ideas? I'm not too clued up on Apache config.
>
> Is apache listening on :8000, too? There should be a file in the
> apache.conf file similar to "Listening". If you add :8000 there, you
> might be successful.

--
Posted via http://www.ruby-....

Phillip Gawlowski

9/12/2007 2:11:00 PM

0



> -----Original Message-----
> From: list-bounce@example.com [mailto:list-bounce@example.com] On
> Behalf Of Nick Coyne
> Sent: Wednesday, September 12, 2007 3:46 PM
> To: ruby-talk ML
> Subject: Re: Proxying junebug through Apache
>
> Thanks. That moved me forward a bit.
>
> Now I'm receiving the error:
> Forbidden
>
> You don't have permission to access / on this server
>
> Looking in the junebug error log I see a line which says:
> [warn] proxy: No protocol handler was valid for the URL /. If you are
> using a DSO version of mod_proxy, make sure the proxy submodules are
> included in the configuration using LoadModule.
>
> Not sure what I should be checking next?

mod_proxy's documentation, probably.

That, or the file permissions of junebug's directory (the apache user, or, at least, the groups apache belongs to should have at least read access to the directories and files).


Otherwise, I'd be as stumped as you by now.

--
Phillip Gawlowski


Bob Showalter

9/12/2007 2:26:00 PM

0

On 9/12/07, Nick Coyne <nick@glasshouse.co.za> wrote:
> I'm trying to configure Junebug to be served through Apache following
> the instructions at http://www.junebugwiki.com/Junebug_In....
>
> The only change I've made from the std Apache config is to serve the
> wiki on port 8000 like so
> <Virtualhost *:80 *:8000>

I have junebug proxied behind Apache 2.2. Here's my vhost setup:

<VirtualHost *:80>
ServerName wiki.mydomain.com
ProxyRequests Off
ProxyPass / http://localhost:3301/
ProxyPassReverse / http://localhost:3301/
ProxyPreserveHost On
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
</VirtualHost>

Also, don't forget to change junebug so it listens only on localhost
if you want to force everything to go through the proxy.

Bob Showalter

9/12/2007 2:30:00 PM

0

On 9/12/07, Nick Coyne <nick@codevader.com> wrote:
> Thanks. That moved me forward a bit.
>
> Now I'm receiving the error:
> Forbidden
>
> You don't have permission to access / on this server
>
> Looking in the junebug error log I see a line which says:
> [warn] proxy: No protocol handler was valid for the URL /. If you are
> using a DSO version of mod_proxy, make sure the proxy submodules are
> included in the configuration using LoadModule.

You need to load mod_proxy and mod_proxy_http. My LoadModule's look like this:

LoadModule proxy_module libexec/apache22/mod_proxy.so
LoadModule proxy_http_module libexec/apache22/mod_proxy_http.so

For the permissions, you need something like this inside your
<VirtualHost> block:

<Proxy *>
Order Allow,Deny
Allow from all
</Proxy>

Most of this you can find by reading the Apache docs under setting up
reverse proxies (which is what this is).

Nick Coyne

9/12/2007 5:18:00 PM

0

I'm going in circles here...

Bob, I tried your vhost setup, no luck though.

I've set permissions on the junebug folder to be the same owner and
group as the Apache user (www-data). No difference.

I load my original file in, which now looks like this:

<Virtualhost *:80 *:8000>
ServerName my.server.name

ProxyRequests Off

#Proxy ACL
<Proxy *>
Order allow,deny
Allow from all
</Proxy>

#Proxy directives
ProxyPass / http://localhost:3301/
ProxyPassReverse / http://localhost:3301/
ProxyPreserveHost On

#Turn rewriting on
RewriteEngine On
RewriteLogLevel 0

#Redirect non-static documents
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ http://localhost:3301%{REQUEST_URI} [P,QSA,L]

DocumentRoot /home/nick/cvwiki/public/

ErrorLog /home/nick/cvwiki/error-cvwiki.log
CustomLog /home/nick/cvwiki/access-cvwiki.log combined

</Virtualhost>

The error I'm now receiving is "503 Service Temporarily Unavailable"
which apparently usually means that Apache can't find anything in the
place its being told to look. If I go to port 3301 in my browser Junebug
is running just fine.

mmmmph.

Nick


Bob Showalter wrote:
> On 9/12/07, Nick Coyne <nick@codevader.com> wrote:
>> included in the configuration using LoadModule.
> You need to load mod_proxy and mod_proxy_http. My LoadModule's look like
> this:
>
> LoadModule proxy_module libexec/apache22/mod_proxy.so
> LoadModule proxy_http_module libexec/apache22/mod_proxy_http.so
>
> For the permissions, you need something like this inside your
> <VirtualHost> block:
>
> <Proxy *>
> Order Allow,Deny
> Allow from all
> </Proxy>
>
> Most of this you can find by reading the Apache docs under setting up
> reverse proxies (which is what this is).

--
Posted via http://www.ruby-....

Bob Showalter

9/12/2007 5:35:00 PM

0

On 9/12/07, Nick Coyne <nick@codevader.com> wrote:
> I'm going in circles here...
>
> Bob, I tried your vhost setup, no luck though.
>
> I've set permissions on the junebug folder to be the same owner and
> group as the Apache user (www-data). No difference.

The permissions don't have anything to do with the proxy setup. Try it
with all the rewrite stuff commented out. Does that make a difference?

>
> I load my original file in, which now looks like this:
>
> <Virtualhost *:80 *:8000>
> ServerName my.server.name
>
> ProxyRequests Off
>
> #Proxy ACL
> <Proxy *>
> Order allow,deny
> Allow from all
> </Proxy>
>
> #Proxy directives
> ProxyPass / http://localhost:3301/
> ProxyPassReverse / http://localhost:3301/
> ProxyPreserveHost On
>
> #Turn rewriting on
> RewriteEngine On
> RewriteLogLevel 0
>
> #Redirect non-static documents
> RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
> RewriteRule ^/(.*)$ http://localhost:3301%{REQUEST_URI} [P,QSA,L]
>
> DocumentRoot /home/nick/cvwiki/public/
>
> ErrorLog /home/nick/cvwiki/error-cvwiki.log
> CustomLog /home/nick/cvwiki/access-cvwiki.log combined
>
> </Virtualhost>
>
> The error I'm now receiving is "503 Service Temporarily Unavailable"
> which apparently usually means that Apache can't find anything in the
> place its being told to look. If I go to port 3301 in my browser Junebug
> is running just fine.
>
> mmmmph.

The 503 means that it can't talks to http://localhost:3301. Is Junebug
listening on localhost? Or is it only bound to an external interface?
Stop and restart your browser.

You're getting close...

Nick Coyne

9/12/2007 6:00:00 PM

0

Bob Showalter wrote:
> On 9/12/07, Nick Coyne <nick@codevader.com> wrote:
>> I'm going in circles here...
>>
>> Bob, I tried your vhost setup, no luck though.
>>
>> I've set permissions on the junebug folder to be the same owner and
>> group as the Apache user (www-data). No difference.
>
> The permissions don't have anything to do with the proxy setup. Try it
> with all the rewrite stuff commented out. Does that make a difference?
>
>> Order allow,deny
>> RewriteLogLevel 0
>> </Virtualhost>
>>
>> The error I'm now receiving is "503 Service Temporarily Unavailable"
>> which apparently usually means that Apache can't find anything in the
>> place its being told to look. If I go to port 3301 in my browser Junebug
>> is running just fine.
>>
>> mmmmph.
>
> The 503 means that it can't talks to http://localhost:3301. Is Junebug
> listening on localhost? Or is it only bound to an external interface?
> Stop and restart your browser.
>
> You're getting close...

Bob, I LOVE YOU!!

Changing host in config.yml to 127.0.0.1 fixed it!

Thx
Nick
--
Posted via http://www.ruby-....