Guidance on nginx proxying (or migrating to nginx)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hello all 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. Other possibilty would be migrate configuration from Apache to Nginx, but I need some guidance on this topic. Regards and thanks in advanced -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVsNanAAoJEPploz+wCpxHq+oP/RCdcd79Zonhio2H3ZrLO0bL E53Q0coALUPKrzy1wJtXF9/0SuddKUnwU9sPxj8ejI+jcZ5/bvwBrvsrgxNkvF/O L3J7nBsMUoeblhRDEevNPw/DzU50k37E23Lsn93g8m3g51OmEJqJagtIu4MBccU1 LyycxAHZ9avxTUVBvjyMmXGNViNG0q/kIGe1ygPbGoY7bDRv4bQ4wb322BhFpc5+ 7tgUO3n0lm8b+tNo2XVlxhsMYJYqWrY8sF8bKu8VBG3sgdbmG52YgilHKR+FQu5q 1j6Wcp+4ZQJNtXGYWi1y4WSecB07/hLXX1HBhhPJPNa9TOscfpyKn8B7x6Y11rtJ mQGMDWjHvS3+mm+kGAvx2clKIR/ofq9pMKCQXCY4s1kIkWcnbbZCqtRafbZir5uk C5V9gem1Wb/nLiIsuHNeZ9LKNkw/Lm5/kSejvC953rFgEA+WKhnzX0t2Dn378bgn 1rANuN8Cr7SGEWd5lV1k+/TztPT/Xxd0waz152L8WruYad1XRov73GFppnEtY0go sTx221OdALjSMUlLZKVEe8JGmrflpwaP+JngnglrReb8xp7nRw0ForB3IL6Gv+SA p2Zusswbfgrxf68afC7kcrQH3hWLrlW6CMfFpq8LUq4hzCtGSPEcuwUsaguXHuSv rQtRKRuEHO5Dy75DHRSH =agM0 -----END PGP SIGNATURE-----
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. -- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5FA7 4B49 1E4D CAA4 4C38 8505 77F5 B724 F871 3BDF
-----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@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-----
Angel schreef op vr 24-07-2015 om 09:47 [+0200]:
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.
That's surprising. I'd start by looking in the HTML and see where it sends you. If that's normal, using firebug or something see the actual path that the request takes, and what the URL is that's doing the redirection. See if it's coming from Apache or nginx. Koha shouldn't be hard-coding any hostnames or ports in, and if it is, that's a bug. -- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5FA7 4B49 1E4D CAA4 4C38 8505 77F5 B724 F871 3BDF
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 El 27/07/15 a las 00:58, Robin Sheat escribió:
Angel schreef op vr 24-07-2015 om 09:47 [+0200]:
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.
That's surprising. I'd start by looking in the HTML and see where it sends you. If that's normal, using firebug or something see the actual path that the request takes, and what the URL is that's doing the redirection. See if it's coming from Apache or nginx. Koha shouldn't be hard-coding any hostnames or ports in, and if it is, that's a bug.
Finally I got solve it: I added a line in nginx configuration file: proxy_redirect <url> <url:port> In any case, I'll try to migrate to nginx, but now I have no the pressure of the running of staff part. Regards
_______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVxC8NAAoJEPploz+wCpxH0hAQAJ/Y307Qmy2iMeQ1VF/qSYwJ oZ2ZvZMhj8eqn7EcaYsBrZFX0FOdIbs7vuvnJeA7jPAR1j5OHJJ9iqBav8+NEuHB ZOIshK+0BBJ3EhcszAbNF0noqXKRwfwmaIZ49XlWM5Q6ZXanllSX4uu5B0l/GjaO dHgFr+wrSaL0gcqBNxcYVLvpGXlQpe8jhVgo/D8PmnWHtAhwR3T4l/U7hJ2evsh3 NyyjRmxCZzYCQqzO1i8Sz4xrVYxaoJ6o+s14S8GzTs42XD0Ogz7n1mJZUd9E/i1g E7WqsrLGypDHhSqptnhos+8xCCpFUu4/MpOjpAVjevQ7rYhZs7sdWDCl7fsDK0FR SGES2VcnNxf3KEGEADcbU8QIRNe0mu8UV0/XYVvG7D/47ulMi8yv2Da/e7mEATOw QFXX7kvbBaBD4OLd5X6gdtrukeymth1858kVKg50mJjrQmIvji6OoTBmCeSOI1C6 Ec3qdRE0QomKcWJHNYU7Qxpl8xRC+HXzjgx23hUDaXxoRQwpYE57LuFA0k//B+IQ knqb8G1tNgoQ3PeFtuSQH9txzoTNDY4V3cxBthymoqacny+BPj09/CnZurVOlV3/ PcylhsLOHHSffEXwuzVGHpxeWm1v864fP150zxbUBTn+D/Igo0J26agcIg+V66NM tE1MLDBfldEeG4CLZKW8 =11LM -----END PGP SIGNATURE-----
participants (2)
-
Angel -
Robin Sheat