Support community for TTG plugins and products.
NOTICE
The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.
This forum is now closed, and exists here as a read-only archive.
You are not logged in.
I'm using Nginx, rather than Apache. You have a recommended Nginx configuration in your documentation Appendix that I have been using very successfully, and my site is working great. Since BL2 seems to rely very heavily on the .htaccess rewrite rules to function correctly, is there a recommended set of changes to the Nginx configuration to reflect these required rewrite rules?
Offline
Not so far. I would need to find the time to deploy on Nginx to see what changes need to be made to the configuration.
While Backlight 2 makes heavy use of .htaccess to use clean URLs, in many ways Backlight 2 depends very little on .htaccess. 99% of it should run without any support for rewriting URLs at all. In that case, dynamic URLs all take the form of ?m=application&c=controller&action=something&p1=123.
As with Nginx, I will need to take time to test further with rewrite disabled completely to see how well this works. I think that the LR Publisher will need to be updated to handle an API URL like http://yoursite.com/backlight/?m=publisher
Offline
Thank you for the information.
I'll await an update to the publisher and adjustments to Nginx configuration information, so that I can upgrade to BL2 as it looks to be excellent.
Last edited by gkar47 (2018-09-14 06:21:50)
Offline
Is there any update on using/configuring Backlight 2 with Nginx?
Offline
Only that I've had a cursory look into it and discovered there are a few changes that will need to be made. As we do not officially support Nginx, our priority is on fixing other issues first.
Offline
Ok. I'll await when you get caught up and can look into Nginx.
Thank you.
Offline
Hi Ben,
Just touching base to see if there has been any progress in the adjustments needed to install Backlight2 on Nginx? I would really like to upgrade to Backlight2 and make use of it's wonderful new capabilities.
Offline
I'd started to look into this, but came across more dependencies on clean URLs than I expected. Thanks for the bump. I'll try to prioritise it.
Offline
Hi Ben,
Just checking if you have had any time to look at this.
Offline
Hi Ben,
Have you had a chance to have a look at the Nginx adjustments needed?
Offline
Sorry, I keep getting dragged away by other tasks. I will revisit this, again.
Offline
Thank you.
I would really like to upgrade to Backlight 2, since I'm seeing and hearing so much good about it.
Offline
I've almost completed getting the main Backlight functionality working without needing URL rewriting. That is, galleries, publishing, etc. Which other plugins do you use? Cart, Client Response, Galleria, Theater, Wordpress?
Offline
Thank you.
I use Galleria and Theatre plugins.
Offline
Just checking if there is any progress with the Nginx install for Backlight 2?
Offline
There has been progress and we have a version that does not need Apache URL rewriting in our testing stream.
It would be helpful if you could use this version and provide any feedback on issues.
To use it:
* After uploading the extracted files from the installer, copy or rename the file backlight/env.php.skel to backlight/env.php
* Edit the file and change the value for STREAM from "release" to "testing"
* Continue setting up Backlight as usual
You should see a red "testing" icon in the footer of the Backlight admin page.
The only other thing to change is the format of the API URL set in Lightroom's Publisher. This needs to be in the format of
http://yoursite.com/backlight/?m=publisher
That format likely won't change, because the Publisher can't determine whether the server is using Backlight 1 or 2 and the new format won't work for Backlight 1.
Please give it a try and let me know how it goes. There are no known issues other than in handling search forms between Wordpress and Backlight. Once the changes are ready to go into the release stream, changing from testing is a matter of undoing the change to env.php and clicking 'reinstall all' in the Backlight Modules page.
Offline
I've got it installed and was going through the installer. It succeeded. But, when I click the "Continue to Backlight" button I get the following error:
preg_match() expects at least 2 parameters, 1 given|#0 [internal function]: ErrorHandler::handleError(2, 'preg_match() ex...', '/www/billelliot...', 220, Array) #1 /www/billelliot.ca/html/backlight/modules/module-framework/helpers/URLHelper.php(220): preg_match('/8443/www.bille...') #2 /www/billelliot.ca/html/backlight/modules/module-framework/helpers/URLHelper.php(193): URLHelper::pageURL('/backlight/') #3 /www/billelliot.ca/html/backlight/modules/module-framework/helpers/URLHelper.php(199): URLHelper::absoluteCurrentPageURL() #4 /www/billelliot.ca/html/backlight/modules/module-framework/models/Dispatchable.php(267): URLHelper::currentPageURL() #5 /www/billelliot.ca/html/backlight/modules/module-framework/models/Dispatchable.php(92): Dispatchable->processAuthentication() #6 /www/billelliot.ca/html/backlight/modules/module-framework/Framework.php(50): Dispatchable->init() #7 /www/billelliot.ca/html/backlight/index.php(32): Framework->route() #8 {main}|URL: /backlight/index.php
So I can't get to the Admin screen to change the format of the API URL.
What should I do?
Offline
What should I do?
Thanks for testing it. Wait for me to fix it. I'll look into this tonight.
Offline
Further to the above, if possible can you provide me with FTP access. This is in case I'm not able to reproduce it on my end.
Offline
Further again, try visiting /backlight/ on your server. It may just be that the 'continue' link doesn't work.
Offline
The link from'continue' is correct and works in that it takes me to /backlight/. It just produces the error. I tried it directly and get the same result.
I don't currently have external ftp access. But, if you need it I can get it setup.
Also, if you need any log outputs, I can provide you with those.
Offline
I can see the problem. Can you try doing the following and let me know if it solves it:
Edit the file on your server backlight/modules/module-framework/helpers/URLHelper.php and change line 220 from this:
if (!isset($_SERVER['HTTP_HOST']) || preg_match('/'.$_SERVER['SERVER_PORT'].'/'.$_SERVER['HTTP_HOST'])) {
to this:
if (!isset($_SERVER['HTTP_HOST']) || preg_match('/'.$_SERVER['SERVER_PORT'].'/', $_SERVER['HTTP_HOST'])) {
The only change is replacing the last period with a comma and space.
Offline
Something important for you to note.
Without mod-rewrite support, you'll need to add lines into your Nginx config to prevent access to the data files and digital purchases, if you're using those with the cart. To do that, see the Wiki documentation for Nginx, on Backlight 1:
http://backlight.theturninggate.net/doc … web_server
In particular, your server config should have these two entries:
# protect against direct downloads of data files
location /backlight/data/ {
return 404;
}
# protect against direct downloads of digital purchases
rewrite ^(.*)/(.*)/photos-for-purchase/* / last;
Ignore further URL-related entries in that document for now.
Offline
I've made major progress. I can now get to the admin page and have been able to look around there. There was one other rewrite rule in my nginx config from Backlight 1. Is the following still needed:
rewrite ^(.*)/(.*)-single.php $1/single.php?id=$2 last;
Not all my modules are there. I'm missing the addons Galleria and Theatre.
Also, when I try to view an album I get the following error:
Warning: require_once(./../../../backlight/framework/Framework.php): failed to open stream: No such file or directory in /www/billelliot.ca/html/albums/Puerto-Vallarta-Mexico-Trip/1-Puerto-Vallarta-Malecon/lib.php on line 48
Fatal error: require_once(): Failed opening required './../../../backlight/framework/Framework.php' (include_path='.:/usr/lib64/php/:/usr/share/pear/:/usr/share/php/') in /www/billelliot.ca/html/albums/Puerto-Vallarta-Mexico-Trip/1-Puerto-Vallarta-Malecon/lib.php on line 48
I've looked and the lib.php file is there.
Offline
Oops. Forget the problem with viewing my albums. I forgot to click in admin on the Special Links / Update Album Files. I did that and can now view my albums.
Offline