From: Ben H. <ph...@gr...> - 2005-09-15 17:27:59
|
On Thu, Sep 15, 2005 at 08:09:07AM +0100, Reini Urban wrote: > specify in your config.ini the required SERVER_* vars Yeah, I saw those, but what would I set them to? I need to access the wiki (through my tunnel from home) at http://localhost:8080/wiki/ Everyone else in the office (on the same local net as the wiki) accesses the wiki at its real address: http://10.0.0.10/wiki. =20 I can't very well set the SERVER_NAME to localhost, because then anyone accessing it directly (not through a tunnel) will have links pointing them to their local computer. Also, I happen to choose port 8080 for my tunnel, but what if someone else chooses local port 8000? or 4566? =20 What I have done in the interim is changed the IP address to a hostname (wikiserv), so on the same private net as the wiki, people can access http://wikiserv/wiki. I can then modify my /etc/hosts file on my local computer to alias wikserv to localhost. Further, since I can be root, I have set the source port of my ssh tunnel to port 80 instead of 8080, which lets me access the wiki at http://wikiservr/wiki as well. This is an unsatisfactory solution, because it is * excessively complex for a non-technical remote employee * takes over port 80, preventing me from running a local web server. (the second point is more important in my mind) I think making the URLs relative instead of absolute within the wiki would be far preferable. =20 Thoughts? -ben >=20 > On 9/13/05, Ben Hartshorne <ph...@gr...> wrote: > >=20 > > Hi, > >=20 > > I am connecting to a wiki that exists in a private network through an > > ssh tunnel. > >=20 > > wiki: http://10.0.0.10/wiki > > me: 192.168.1.100 <http://192.168.1.100> > > public IP 123.45.67.89 <http://123.45.67.89> has internal IP 10.0.0.89<= http://10.0.0.89> > >=20 > > ben@me ~$ ssh -L8080:10.0.0.10:80 <http://10.0.0.10:80> 123.45.67.89<ht= tp://123.45.67.89> > >=20 > > connect to http://localhost:8080/wiki > >=20 > > My problem is that when I load this page with Firefox, it interprets the > > "base href" tag on the page to write all the links with their full path, > > i.e. http://10.0.0.10/wiki/index.php/PageName > >=20 > > Heavily excerpted HTML: > > <html> > > <head> > > <base href=3D"http://10.0.0.10/wiki/index.php/" /> > > </head> > > <body> > > <a href=3D"PageName" class=3D"wiki">PageName</a> > > </body> > > </html> > >=20 > > So, firefox reads this to mean that when I click on PageName, it takes > > me to http://10.0.0.10/wiki/index.php/PageName. Obviously, this doesn't > > work. > >=20 > > I see that base href is specified in the templates: > > [ben@punchout wiki]$ grep -ri "base href" * > > themes/Crao/templates/head.tmpl:<base href=3D"<?=3DPHPWIKI_BASE_URL?>" = /> > > themes/wikilens/templates/head.tmpl:<base href=3D"<?=3DPHPWIKI_BASE_URL= ?>" /> > > themes/default/templates/dialog.tmpl:<base href=3D"<?=3DPHPWIKI_BASE_UR= L?>" /> > > themes/default/templates/head.tmpl:<base href=3D"<?=3DPHPWIKI_BASE_URL?= >" /> > > themes/default/templates/redirect.tmpl:<base href=3D"<?=3DPHPWIKI_BASE_= URL?>"=20 > > /> > >=20 > > I would like to strip out the 'base href', but I'm not sure what other > > effects this will have, or if this in even the right way to do it. > >=20 > > Do you have any advice on how to streamline connecting to a wiki through > > a tunnel? > >=20 > > Thanks, > >=20 > > -ben > >=20 > > -- > > Ben Hartshorne > > email: be...@ha... > > http://ben.hartshorne.net > >=20 > >=20 > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v1.4.1 (GNU/Linux) > >=20 > > iD8DBQFDJx9yKeT3tvTdv64RAtSvAJ9bs67uWub7HM0I+WRY00db/LpJ3QCgq7LB > > DtdMG/TQgYTXpYSLt4rH1QA=3D > > =3DnpZI > > -----END PGP SIGNATURE----- > >=20 > >=20 > >=20 >=20 >=20 > --=20 > Reini Urban=20 > http://xarch.tu-graz.ac.at/home/rurban/ --=20 Ben Hartshorne email: be...@ha... http://ben.hartshorne.net |