Gossamer Forum
Home : Products : Gossamer Links : Discussions :

backend server for Links + Forum

Quote Reply
backend server for Links + Forum
Hi:

I have been told that using a backend server is a good way to increase some speed and performance. But I am a bit of a newbie at this, so I was hoping someone might help me along!

First off, do I want to? I have a FreeBSD 4.7 Box and Apache 1.27. Currently, I run LinksSQL ModDave and Forum, both under mod_perl (and yes, the most current versions!) I also run a couple other sites on the box...

So, as I understand it, I keep the apache I have now pretty much the same, I just take out the mod_perl. The I start up a second install of Apache, I make it REALLY lite, and only run the "back end" of Links and Forum on that.

So, what is the "Back End"? Do I install each program twice? Do I just move the admin sections only to the new server?? My server for Links is www.bcdb.com, and forum.bcdb.com for forum... do I just set up a www.bcdb.com:8080 and forum.bcdb.com:8080? Would I be able to set it all up using the paths in the admin (that is /path/to/normal/server for the image directory, /path/to/mod_perl/enabled server for the cgi... and http://www.bcdb.com for the regular, http://www.bcdb.com:8080 for the cgi) or do I leav it all as is, and do it in mod_rewrite?

Sorry for all the questions, like I said, I have never done this sort of thing before. If you feel like replying, PLEASE feel free to be verbose!

Thanks!
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] backend server for Links + Forum In reply to
Forgot!

If there is a good website that explains all this, send me a pointer! But if you have personal experience doing this with Links AND Forum, I would really like to hear from you!

TIA!
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] backend server for Links + Forum In reply to
Hi,

A good read would be:

http://perl.apache.org/..._one_and_two_servers

Basically you:

1. Install a mod_perl enabled apache running on a high port (say port 8000). Set it up so that everything works going to http://yoursite:8000/cgi-bin/links/page.cgi.

2. Remove mod_perl from your normal apache.

3. Make sure mod_proxy is installed in your normal apache.

4. In your frontend apache, add:

ProxyPass /cgi-bin/links/ http://yoursite:8000/cgi-bin/links/
ProxyPassReverse /cgi-bin/links/ http://yoursite:8000/cgi-bin/links/

This will then forward all requests to http://yoursite/cgi-bin/links/ to the mod_perl server completely transparently to the end user. The end user is never aware of a server on port 8000.

You want to make sure only your mod_perl apps are proxied, and the frontend server handles all images and static content.

There are a number of other little gotcha's that are mostly covered in the mod_perl guide. =)

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] backend server for Links + Forum In reply to
Thanks Alex, that got me going.

OK, so I started with forum, and put that in. Reinstalled forum to the new path, and put all my templetes in there. Changed the startup.pl file to point to the new version and restarted the mod_perl server, no ptoblem. Then I added the ProxyPass and ProxyPassReverse statements into the front and started that one.

Looks like it is working... so to check, I changed a templete on the mod_perl version. No change on the front. But when I change the templete on the front, I see the change. So my guess is that it is NOT working.

Any way of testing, or what should I do from here?
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] backend server for Links + Forum In reply to
Weird:

When I change the templetes in the font end, they change. That is what made me think the proxy was not working.

BUT, when I went to the admin on the front site (forum.bcdb.com/admin/admin.cgi and NOT forum.bcdb.com:8000/admin/admin.cgi), I get then new, updated paths....

so might it be working? I am confused! Crazy
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] backend server for Links + Forum In reply to
OK, I tried it a new way, and now I am sure it is running, and running correctly!
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] backend server for Links + Forum In reply to
To confirm that it's working, if you shut down the mod_perl server and try and goto any of your .cgi pages at http://forum.bcdb.com/admin/admin.cgi, then you should get a 502 proxy error. Once you restart the backend, it will work again.

You should also check that you have KeepAlive set to off in the backend, and that you are not loading mod_perl in the frontend.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] backend server for Links + Forum In reply to
Alex:

Looks like I am good then! (Actually, I got a time-out error, not a proxy error, but I imagine that means the same thing)

I had turned off the KeepAlive, I read that somewhere, but nice to have that confirmed!
dave

Big Cartoon DataBase
Big Comic Book DataBase

Last edited by:

carfac: Jun 16, 2003, 11:09 AM