Proxying junebug through Apache

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

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

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.

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.

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.

On 9/12/07, Nick C. [email protected] 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
block:

<Proxy *>
Order Allow,Deny
Allow from all

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

On 9/12/07, Nick C. [email protected] wrote:

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

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

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

On 9/12/07, Nick C. [email protected] 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

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…

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 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

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 S. wrote:

On 9/12/07, Nick C. [email protected] 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
block:

<Proxy *>
Order Allow,Deny
Allow from all

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

Bob S. wrote:

On 9/12/07, Nick C. [email protected] 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

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