Score:0

I can't upload files (Apache)

fr flag

I have a Symfony app running on docker exposing the port 8000, then I proxy the requests from my domain to http://localhost:8000/ it works well but when I want to send files using multipart/form-data it returns a 500 error code without more information, if I make the request directly to http://my_ip:8000 it works fine so I think it is a proxy error.

I checked apache errors.log and I get this error

[http:error] [pid 140227] [client 190.55.60.91:4255] AH02429: Response header name 'PHP message' contains invalid characters, aborting request

This is my apache config:

<VirtualHost *:80>
        ProxyPreserveHost On
        ProxyRequests Off
        ServerName mydomain.com
        ServerAlias mydomain.com

        SetEnv proxy-sendchunked 1

        ProxyPass / http://localhost:8000/
        ProxyPassReverse / http://localhost:8000/
        SetEnv proxy-sendchunks 1
        ProxyTimeout 1000

</VirtualHost>

<IfModule mod_ssl.c>

       <VirtualHost *:443>

                ProxyPreserveHost On
                ProxyRequests Off

                ServerName my_domain.com
                ServerAlias my_domain.com

                ProxyTimeout 60
                ProxyPass / http://localhost:8000/
                ProxyPassReverse / http://localhost:8000/

                ErrorLog ${APACHE_LOG_DIR}/error.log
                CustomLog ${APACHE_LOG_DIR}/access.log combined
                SSLEngine on

                SSLCertificateFile      /etc/ssl/private/my_cert.crt
                SSLCertificateChainFile /etc/ssl/private/ca-bundle-client.crt
                SSLCertificateKeyFile /etc/ssl/private/my_cert.key

                <FilesMatch "\.(cgi|shtml|phtml|php)$">
                                SSLOptions +StdEnvVars
                </FilesMatch>
                <Directory /usr/lib/cgi-bin>
                                SSLOptions +StdEnvVars
                </Directory>

        </VirtualHost>
</IfModule>

I tried to add some properties like "SetEnv proxy-sendchunked 1" and "ProxyTimeout 1000" but it still not working.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.