[Koha] Guidance on nginx proxying (or migrating to nginx)

Angel angelv64 at gmail.com
Fri Jul 24 19:47:03 NZST 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

El 24/07/15 a las 03:42, Robin Sheat escribió:
> Angel schreef op do 23-07-2015 om 13:57 [+0200]:
>> I'm haing some problems with some CGI, notably with Advanced
>> Search. I'm using nginx proxying because I have Koha on a server
>> with all webs hosted using nginx, so I've configured Apache to
>> listen on 65000 and 65001 and configured nginx hosts passing
>> traffic to ports 65000 and 65001, but it seems would be incorrect
>> in nginx configuration almost using Advanced Search.
> 
> You didn't say what your problem was, what version you're running,
> how things are installed, or anything like that that would be
> necessary to help.

Sorry, you're right:

I'm running 3.20.2 on Debian Jessie. The service is configured on
Apache listening on 127.0.0.1 ports 65000 for OPAC and 65001 for
staff, on top I have Nginx configured as proxy redirecting traffic to
http://<server> to http://127.0.0.1:65000 and http://<server>:8080 to
http://127.0.0.1:65001.

Almost all works quite well, but some parts using cgi don't,
especially Advanced Search: I can go to page to select criteria
search, but when I click on search button, I get a window warning me
that is not possible to connect to http://<server>:65001, is curious
because this URL is not the staff one, http://<server>:8080. For me is
like search.pl script calls to other, I'm thinkig in CGI.pm, and after
this calls again search.pl but with URL incorrect. Wit auth_finder.pl
occurs the same.

If so, I think the nginx configuration is not correct, or simply, is
not possible to do it. Perhaps other solution is migrate to Nginx (is
not possible for me migrate all webs in server to Apache), but I need
some guidance to do it.

Below nginx configuration to redirect to Apache

server {
	listen   8080; ## listen for ipv4
	root /var/www;
	index index.php index.html index.htm;
        server_name libreteca.rompeelcirculo.org;
	error_log /var/log/nginx/koha-intra-error.log;
	access_log /var/log/nginx/koha-intra-access.log;

	location / {
           proxy_set_header Host $host;
           proxy_set_header X-Real-IP $remote_addr;
	   proxy_set_header X-Forwarded-For $remote_addr;
           proxy_pass http://127.0.0.1:65001;
      }

}

> 
> 
> 
> _______________________________________________ Koha mailing list
> http://koha-community.org Koha at lists.katipo.co.nz 
> https://lists.katipo.co.nz/mailman/listinfo/koha
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJVse13AAoJEPploz+wCpxHqxkP/2WvQoxWr/mpPcZiKHHK2yOo
Ds/oOCpG1Bf1eRW9dycBjpDmfogwJhzDqhlK4HmqSJd8Ph8q2AmcF48zv9jn71bi
ZfLXRcju44jiiNUSJHydrI1txm0TaxGiiS5ZJuwacx1yA1jlryBqGCCagdeFkWL8
blz5vqgl13pfRCRBDJBWUxtDJ6v2nzvsTKzo2krGuJMMJ20Xo3d40tU8BVNcPnjO
j4E3mIN2eAKklgXx8eVqSMjPgloImVRLocUunl9f7ZERge93B10ZJguZg7ZgW+Jt
XCqiO722EY6U8hAWng+8qTMtngAh7IQGiU9+cMdZm8Se5XzmSisYIJiC4Lu8bIvI
JhT8IRd4tWo0FZI2STNUwfkvFwhmkcfIOsVn8SWnHJ5BfkswsH+SOCrmufAEdRKc
AKxLk2fqQHDxSLfeOiTHUZ3f+AtrvZiE96WbD68tdzuQnFM6ZE5YqPPNGKk/QheF
ForeHxfraoixkPDcr/05v0FRAe3Htgy7XmepYAc4E3/m59aSM7B0xNf/nq2aVsu2
JY481UX2N/OxcnQQBoCaU21BZsdcJYrbb6dDaURqENaDPeaoEAbZz6a6LvwKv922
udFnRLQFMQSwCwf0L8BydsjkOhXWe1nEDYCTQ2kTjF89F7QvOJJTCXOwn1mJ4Wjp
Y6emSx3/V/NcuhSghxaA
=GJrY
-----END PGP SIGNATURE-----


More information about the Koha mailing list