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.
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?
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.
Thoughts?
-ben
>
> On 9/13/05, Ben Hartshorne <phpwiki@xxxxxxxxxxxxxxxxxxxx> wrote:
> >
> > Hi,
> >
> > I am connecting to a wiki that exists in a private network through an
> > ssh tunnel.
> >
> > 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>
> >
> > ben@me ~$ ssh -L8080:10.0.0.10:80 <http://10.0.0.10:80>
> > 123.45.67.89<http://123.45.67.89>
> >
> > connect to http://localhost:8080/wiki
> >
> > 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
> >
> > Heavily excerpted HTML:
> > <html>
> > <head>
> > <base href="http://10.0.0.10/wiki/index.php/" />
> > </head>
> > <body>
> > <a href="PageName" class="wiki">PageName</a>
> > </body>
> > </html>
> >
> > 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.
> >
> > I see that base href is specified in the templates:
> > [ben@punchout wiki]$ grep -ri "base href" *
> > themes/Crao/templates/head.tmpl:<base href="<?=PHPWIKI_BASE_URL?>" />
> > themes/wikilens/templates/head.tmpl:<base href="<?=PHPWIKI_BASE_URL?>" />
> > themes/default/templates/dialog.tmpl:<base href="<?=PHPWIKI_BASE_URL?>" />
> > themes/default/templates/head.tmpl:<base href="<?=PHPWIKI_BASE_URL?>" />
> > themes/default/templates/redirect.tmpl:<base href="<?=PHPWIKI_BASE_URL?>"
> > />
> >
> > 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.
> >
> > Do you have any advice on how to streamline connecting to a wiki through
> > a tunnel?
> >
> > Thanks,
> >
> > -ben
> >
> > --
> > Ben Hartshorne
> > email: ben@xxxxxxxxxxxxxx
> > http://ben.hartshorne.net
> >
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.1 (GNU/Linux)
> >
> > iD8DBQFDJx9yKeT3tvTdv64RAtSvAJ9bs67uWub7HM0I+WRY00db/LpJ3QCgq7LB
> > DtdMG/TQgYTXpYSLt4rH1QA=
> > =npZI
> > -----END PGP SIGNATURE-----
> >
> >
> >
>
>
> --
> Reini Urban
> http://xarch.tu-graz.ac.at/home/rurban/
--
Ben Hartshorne
email: ben@xxxxxxxxxxxxxx
http://ben.hartshorne.net
signature.asc
Description: Digital signature
|