Koozali.org: home of the SME Server

Gallery and port forwarding

bjarni

Gallery and port forwarding
« on: May 30, 2004, 02:34:44 PM »
I have two servers running SME 6.0.1.

The first is running as Gateway and Server and faceing the internet. The second just as server on my internal net.

I have installed Gallery as discribed in ( http://sme.swerts-knudsen.dk/howtos/howto_13.htm ). So far so good.

I want to make my gallery visible from both internet and inside my internal net. This gives me some problems because I have to specify a full URL in the setup of Gallery for the parameters "Gallery URL" and "Albums URL":

How do I do this, so that Gallery is visible from both inside and outside?

On my first server I have made a portforwarding of port 8001 to my second server, so that it is possible to access Gallery with this URL:

http://MYIP:8001/gallery

to make gallery work I must set the two parameters as:

Gallery URL: "http://MYIP:8001/gallery"
Albums URL: "http://MYIP:8001/gallery/albums"

But now I can't access gallery from inside my local network, because my first server does not forward internal computers to my second server on port 8001.

Is there a solution to this problem?

/bjarni

Anonymous

Gallery and port forwarding
« Reply #1 on: May 30, 2004, 04:27:48 PM »
I found this solution myself:

In the file: "config.php" I changed the two lines

$gallery->app->photoAlbumURL = "http://MYIP:8001/gallery";                                      
$gallery->app->albumDirURL = "http://MYIP:8001/gallery/albums";                                

so that they now holds relative URLs and look like this:

$gallery->app->photoAlbumURL = "/gallery";                                      
$gallery->app->albumDirURL = "/gallery/albums";                                

I don't know if this is the right way to do this. But it works.

Note: You will have to redo this each time you run the config wizard, since the config wizard won't accept relative urls.

/bjarni