photoAlbumURL/albumDirURL problem with hardcoded URLs
mcs
Joined: 2005-07-05
Posts: 1 |
Posted: Tue, 2005-07-05 11:31 |
I am a newbie at Gallery, and thought I would try it out. However, with my web hosting setup, Gallery would not work. This is due to the following variables, and their hardcoded values. $gallery->apps->photoAlbumURL web I have a staticly assigned IP address, (although Dynamic DNS would pose the same problem), to which I have registered my domain. The firewall maps this to the web host. While proceeding through the otherwise excellent configuration screens, the domain of the host must be entered. This was done, and the correct entry was applied in the config.php file. However, when I went to enter the application for the first time, I received an error. This was due to my firewall receiving a request from the inside, to open my web server address (returned from DNS lookup), which is the outside interface of the router - and hence blocking this. My firewall is secure enough as it is, while at the same time, not the most configurable beast, and I do not want to play with it's settings. To overcome this, I modified the above variables to be the following : $gallery->apps->photoAlbumURL = "http://" . $_SERVER['HTTP_HOST'] . "/gallery" ; Now, I can use the internal address directly to the host when I access the web server (eg http://192.168.1.50/gallery), and external users access the web server as per normal (eg http://www.mydomain.com/gallery). I am not a PHP expert, but just play around a bit, so I don't know what security impacts this might have. If there is a different way to achieve the same result, I would be glad to hear of it. It was the first thought that came to me. I have not noticed any problems with this setup, yet ... regards |
|
Posts: 13451
You could also work around it by using FAQ Gallery:c.22