Hosting a forum external to the PirateBox

Posted by drhitchcock 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Hosting a forum external to the PirateBox
December 16, 2012 02:48AM
Hey all,

Apologises if this has been covered in other forum posts but I couldn't seem to find the info that I'm after.

I am running a PirateBox with a Raspberry Pi connected to it via ethernet. I have set-up a Phorum Forum on the Pi. The Pi is currently set to 192.168.1.23 and the forum lives at [192.168.1.23] - the inital page loads up but when I go to subsequent pages it redirects to the PirateBox landing page. Is there a way to disable redirects on certain addresses? Is there another way to make this work? I still wan to use the chatbox etc on the front page.

I did find some details in the /opt/piratebox/conf/piratebox.conf file but I wasn't sure how to go about it.

Many thanks,
Dr H
Re: Hosting a forum external to the PirateBox
December 16, 2012 08:37AM
Hi,
find and edit forest.py
It should be located in /opt/piratebox/www/cgi-bin/forest.py

The relevant section is this
Language: Python
# ============================================================================ # Configuration # ============================================================================   # Where the threads are stored. This folder must exist. DATA_PATH = ';/opt/piratebox/forumspace/'; #Where the forest CGI is located (as a URL). CGI_URL=';/cgi-bin/forest.py'; # Where the main stylesheet is kept (as a URL). CSS_PATH = ';/forest.css'; # What is the title of the board? BOARD_TITLE = ';PirateBox Board'; # Simple Description of the board, appears at the top of each page BOARD_DESCRIPTION = """PirateBox Board. Put media reviews or questions here.<br> <A HREF="http://piratebox.lan">Click here to go back to the main site</a> """

Because you pyforum lies under another folder, you have to change the cgi_url.

Hope this helps

Matthias



Edited 1 time(s). Last edit at 12/16/2012 08:38AM by Matthias.
Re: Hosting a forum external to the PirateBox
December 16, 2012 11:06PM
I'm not using forest, I'm using Phorum on an external device, is the code you've quoted still relevant?

Is there a simple way of stopping redirects on certain IPs and sub folders?
Re: Hosting a forum external to the PirateBox
December 17, 2012 06:28AM
Is the 2nd device a piratebox-installed one, too?

If you have a "domain name", which you want not to be redirected, add it to:
/opt/piratebox/conf/hosts

in your piratebox.

And it is not possible to direct subfolders to 2nd devices.



Edited 1 time(s). Last edit at 12/17/2012 06:28AM by Matthias.
Re: Hosting a forum external to the PirateBox
December 18, 2012 12:21AM
No the second device is just running a variant of Raspian called Occidentalis V0.2.

Can the domain name be an IP, for example 192.168.1.23? In the Hosts file the syntax is:
127.0.0.1 Localhost

Would I put something like:
192.168.1.23 192.168.1.23

It still seems to be redirecting. If this doesn't work is there a way just to turn off the redirect funcationality?

Thanks so much for your help.
Dr H
Re: Hosting a forum external to the PirateBox
December 18, 2012 11:21AM
If you only have the IP, you don't need to add a hosts entry.

But, I think we don't understand each other correctly.

Can you please post:

1. IP of your 1st device
2. How do you "redirect" to the 2nd device
3. What is on the 2nd device running that you can hosts the forum?
4. Can you post the config of the forum?
Re: Hosting a forum external to the PirateBox
December 23, 2012 01:40AM
Hello Matthias,

Thank-you so much for your time and patience.

After much testing and research I discovered that the issues was with the forum config. I had the forum address set to the public ip from when I was using it online instead of the local IP I was using on the PirateBox. So every time I went beyond the root level it was hitting a 404 and then the PB was taking over and redirecting to piratebox.lan.

Consider this topic closed.

Many thanks and Merry Ho Ho,
Dr H.