AH03307: ap_proxy_transfer_between_connections: error on origin - ap_pass_brigade - Apache

Antonio Junior3 months ago

Hello gentlemen, I would like some help please, I didn't find a configuration for https with nginx in the documentation, could someone help me if they have had or have this error here in Apache.

[Sat Feb 03 13:47:25.420687 2024] [proxy:error] [pid 8114] (70014)End of file found: [client 177.37.151.218:57266] AH03307: ap_proxy_transfer_between_connections: error on origin - ap_pass_brigade
[Sat Feb 03 13:47:25.420912 2024] [proxy:error] [pid 8114] [client 177.37.151.218:57266] AH10221: proxy: websocket: client flushing failed (-102)
[Sat Feb 03 13:47:53.198868 2024] [proxy:error] [pid 8249] (70014)End of file found: [client 177.37.151.218:38820] AH03307: ap_proxy_transfer_between_connections: error on origin - ap_pass_brigade

follow apcche configuration for reverse proxy.

<VirtualHost *:80>
  ServerName gdrastreamento.com
  Redirect / https://gdrastreamento.com/
RewriteEngine on
RewriteCond %{SERVER_NAME} =gdrastreamento.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<IfModule mod_ssl.c>
        <VirtualHost _default_:443>

                ServerName gdrastreamento.com
                ServerAdmin webmaster@localhost

                DocumentRoot /var/www/html

                ProxyPass /api/socket ws://localhost:8082/api/socket
                ProxyPassReverse /api/socket ws://localhost:8082/api/socket

                ProxyPass / http://localhost:8082/
                ProxyPassReverse / http://localhost:8082/

                SSLEngine on

                SSLCertificateFile /etc/letsencrypt/live/gdrastreamento.com/fullchain.pem
                SSLCertificateKeyFile /etc/letsencrypt/live/gdrastreamento.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
        </VirtualHost>
</IfModule>

Thanks!

Anton Tananaev3 months ago
  1. Is it working without proxy?
  2. What's the error in the browser?
Antonio Junior3 months ago

1 - it is redirecting to port 443. only apache proxy.

2- At times the browser appears to fail intermittently.

Version 5.9

Thanks!

Anton Tananaev3 months ago

First you should try without proxy. Then we'll know if it's a proxy issue or not.

Antonio Junior3 months ago

Thanks Anton, I'll be doing that. Is there anything in the documentation that could reflect this? Or could you suggest changes please? Thanks!

Anton Tananaev3 months ago

Well, you have to check first. If it's an Apache problem, it's probably better to ask on Apache support resources.

Antonio Junior3 months ago

solved it like this Anton. Thanks!

<VirtualHost *:80>
    ServerName gdrastreamento.com
    Redirect / https://gdrastreamento.com/
</VirtualHost>

<IfModule mod_ssl.c>
    <VirtualHost _default_:443>
        ServerName gdrastreamento.com
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www/html

        SSLEngine on

        SSLCertificateFile /etc/letsencrypt/live/gdrastreamento.com/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/gdrastreamento.com/privkey.pem
        Include /etc/letsencrypt/options-ssl-apache.conf

        <Location "/api/socket">
            ProxyPass "ws://localhost:8082/api/socket"
            ProxyPassReverse "ws://localhost:8082/api/socket"
            ProxyPassReverseCookiePath "/api/socket" "/"
        </Location>

        <Location "/">
            ProxyPass "http://localhost:8082/"
            ProxyPassReverse "http://localhost:8082/"
        </Location>
    </VirtualHost>
</IfModule>
Antonio Junior3 months ago
[Sat Feb 03 19:46:08.644282 2024] [mpm_prefork:notice] [pid 14393] AH00163: Apache/2.4.52 (Ubuntu) OpenSSL/3.0.2 configured -- resuming normal operations
[Sat Feb 03 19:46:08.644348 2024] [core:notice] [pid 14393] AH00094: Command line: '/usr/sbin/apache2'