[users@httpd] Re: GET working but POST failing with error 502
Yann Ylavic, > This sounds like a crash or something which causes Redmine > to close the connection upon receipt of the POST request > (without any response). The people at Bitnami asked me to try with port 3001 instead of 81, explaining that Redmine's Thin server is on 3001, and Apache is just a proxy. When I made that change, POST started to work: https://community.bitnami.com/t/redmine-rest-api-post-requests-failing-with-error-502/89345/10 > I don't know what a "Bitnami Redmine stack" httpd > configuration looks like unfortunately. I can easily pack and send you a bunch of config files if won't mind it. > There should be a line like: > > ProxyPass ... http://127.0.0.1:3002 ... > > or: > > > ... > ProxyPass http://127.0.0.1:3002 ... > ... > > > somewhere, and adding disablereuse=on to the end of this > ProxyPass line would disable connection reuse. That ProxyPass setting has come up many times in context of this error 502, but the catch is that is commented out in our version of apache2\conf\httpd.conf > If that changes nothing, something is happening in the > Redmine application which httpd really can't know about. Now that it works with port 3001, I think Redmine itself is allright. > If Redmine crashed (which could explain why there are no > logs on its side), you should see something like "child > pid exit signal..." in one of the log files. I see nothing of the sort under apache2\logs\ > Possibly you could ask on Bitnami forums how to get more > traces from Redmine. I have done so (see link above). - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Re: GET working but POST failing with error 502
Hi Anton, On Wed, Dec 9, 2020 at 12:00 PM Anton Shepelev wrote: > > > There should be a line like: > > > > ProxyPass ... http://127.0.0.1:3002 ... > > > > or: > > > > > > ... > > ProxyPass http://127.0.0.1:3002 ... > > ... > > > > > > somewhere, and adding disablereuse=on to the end of this > > ProxyPass line would disable connection reuse. > > That ProxyPass setting has come up many times in context of > this error 502, but the catch is that is commented out in > our version of > >apache2\conf\httpd.conf If this log shows up on the httpd side: [proxy_http:error] ... AH01102: error reading status line from remote server 127.0.0.1:3002 it means that there *is* a ProxyPass (or RewriteRule [P]) that configures httpd to do the proxying to 127.0.0.1:3002. If you can't find this piece of configuration you can send me the full "apache2\conf" archive (privately if you prefer). Since Redmine seems to run on port 3001 (not 3002), the fix would be to replace 127.0.0.1:3002 by 127.0.0.1:3001 in the httpd proxy settings.. Regards; Yann. - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
[users@httpd] Re: GET working but POST failing with error 502
Yann Ylavic: > If this log shows up on the httpd side: > >[proxy_http:error] ... AH01102: error reading status line from remote > server 127.0.0.1:3002 It surely does. > it means that there *is* a ProxyPass (or RewriteRule [P]) > that configures httpd to do the proxying to > 127.0.0.1:3002. I used my favourite feachure of FAR Manager: search inside many files. I cannot have missed it. Neither did I find a mention of `RewriteRule'. > If you can't find this piece of configuration you can send > me the full "apache2\conf" archive (privately if you > prefer). Thank you very much. Expect it in your mailbox in a few minutes. > Since Redmine seems to run on port 3001 (not 3002), the > fix would be to replace 127.0.0.1:3002 by 127.0.0.1:3001 > in the httpd proxy settings.. I beg your pardon for neglecting to say that, for whatever reason, our Redmine from Bitnami is using two "Thin severs", on ports 3001 and 3002. - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
[users@httpd] some questions to mod_rewrite
Hi, i just setup a Nextcloud instance in conjunction with OnlyOffice. NC makes heavy use of mod_rewrite and i try to understand it. mod_rewrite isn't easy, so i have some questions and hope for help: 1. Is a RewriteCond just valid for the consequent rule or for all consequent rules ? 2. Example: "RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]" Are Backreferences also in flags possible ? What is the content of $1 ? I thought backreferences belong to parts of the pattern which are in parentheses ? There are no parentheses. 3. Example: RewriteCond %{REQUEST_FILENAME} !\.(css|js|svg|gif|png|html|ttf|woff2?|ico|jpg|jpeg|map|webm|mp4|mp3|ogg|wav)$ The ! (exclamation mark) stands for a negotiation. Does that mean this condition is only fullfilled if the file does NOT have an extension like .css, .js ... ? 4. Example: RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}] What does this rule do ? All requests (.*) aren't substituted (-). But ... an environment variable HTTP_AUTHORIZATION is set to ... ? What means %{HTTP:Authorization} ? Is that also a kind of a backreference ? More questions will follow :-)) Thanks. Bernd -- Bernd Lentes Head of Systemadministration Institute for Metabolism and Cell Death (MCD) Building 25 - office 122 HelmholtzZentrum München bernd.len...@helmholtz-muenchen.de phone: +49 89 3187 1241 phone: +49 89 3187 3827 fax: +49 89 3187 2294 http://www.helmholtz-muenchen.de/mcd Helmholtz Zentrum München Helmholtz Zentrum Muenchen Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH) Ingolstaedter Landstr. 1 85764 Neuherberg www.helmholtz-muenchen.de Aufsichtsratsvorsitzende: MinDir.in Prof. Dr. Veronika von Messling Geschaeftsfuehrung: Prof. Dr. med. Dr. h.c. Matthias Tschoep, Kerstin Guenther Registergericht: Amtsgericht Muenchen HRB 6466 USt-IdNr: DE 129521671 - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] some questions to mod_rewrite
On Wed, Dec 9, 2020 at 11:35 AM Lentes, Bernd wrote: > > Hi, > > i just setup a Nextcloud instance in conjunction with OnlyOffice. > NC makes heavy use of mod_rewrite and i try to understand it. > mod_rewrite isn't easy, so i have some questions and hope for help: > > 1. Is a RewriteCond just valid for the consequent rule or for all consequent > rules ? just the 1 next rule > 2. Example: "RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]" >Are Backreferences also in flags possible ? yes >What is the content of $1 ? I thought backreferences belong to parts of > the pattern which are in parentheses ? >There are no parentheses. Looks wrong due to no parens. Likely returns an empty string. > 3. Example: RewriteCond %{REQUEST_FILENAME} > !\.(css|js|svg|gif|png|html|ttf|woff2?|ico|jpg|jpeg|map|webm|mp4|mp3|ogg|wav)$ >The ! (exclamation mark) stands for a negotiation. Does that mean this > condition is only fullfilled if the file does NOT have an extension >like .css, .js ... ? yes, it negates the regex. Doing it outside the regex can make many patterns simpler. > 4. Example: RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}] >What does this rule do ? >All requests (.*) aren't substituted (-). But ... an environment variable > HTTP_AUTHORIZATION is set to ... ? >What means %{HTTP:Authorization} ? Is that also a kind of a backreference ? the environmment variable is set to the value of the Authorization request header. - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
[users@httpd] Re: GET working but POST failing with error 502
I wrote: > I have a problem with the Bitnami Redmine stack, based on > Apache, but being an inexpericed user, I do not even know > which component is causing it. Can you please review the > error details below and let me know if a misconfigured > Apache may be the culprit or I should look into Redmine > itself? > > The problem is that Redmine's REST API works for reading > but not for writing, that is the GET command works whereas > the POST command fails with error 502: > >Title: Proxy Error > >The proxy server received an invalid response from an upstream server. >The proxy server could not handle the request. >Reason: Error reading from remote server. > > Apache's error log shows two entries for each failed POST > request: > >[Tue Dec 01 19:33:39.439905 2020] [proxy_http:error] [pid 7108:tid 1068] > (20014)Internal error (specific information not available): [client > 127.0.0.1:52231] AH01102: error reading status line from remote server > 127.0.0.1:3002 >[Tue Dec 01 19:33:39.439905 2020] [proxy:error] [pid 7108:tid 1068] > [client 127.0.0.1:52231] AH00898: Error reading from remote server returned > by /redmine/issues.json > > We are using the default Apache configuration as shipped > by Bitnami. Yann Ylavic have solved this problem for me off-list. With LogLevel trace7 he found the following record in the error log: Expect: 100-continue and suggested that I add Proxy100Continue off to the config file. And the error was gone. Thank you very much, Yann. - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org