Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

421 Error With Apache #1366

Open
agieocean opened this issue Mar 8, 2024 · 1 comment
Open

421 Error With Apache #1366

agieocean opened this issue Mar 8, 2024 · 1 comment
Assignees
Labels
Awaiting Response Waiting for more information / response from issue creator

Comments

@agieocean
Copy link

Describe the bug
When doing a proxy request with proxy.py reverse proxied with Apache I get a 421 error.

To Reproduce
Create a virtual hosts record reverse proxying proxy.py to a domain name with ssl like this:

<VirtualHost *:443>

Header set Access-Control-Allow-Origin "*"
    Header set Access-Control-Allow-Methods "GET,POST,PUT,DELETE,OPTIONS"
    Header set Access-Control-Allow-Headers "Content-Type,Authorization,X-Requested-With"
    Header set Access-Control-Allow-Credentials "true"

   ServerName cors.y232.home
   ServerAlias cors.y232.home
 SSLEngine on
SSLProxyEngine On
   SSLCertificateFile /etc/ssl/certs/cors.y232.home.crt
   SSLCertificateKeyFile /etc/ssl/certs/cors.y232.home.key
ProxyRequests Off
ProxyPass / http://127.0.0.1:8899/
    ProxyPassReverse / http://127.0.0.1:8899/

</VirtualHost>

Then curl -x https://domain https://desireddomain

Expected behavior
Return the proxied request

Version information

  • OS: Ubuntu
  • Device: VM
  • proxy.py Version: latest stable as provided by Docker (as of writing)

Additional context
I dont see the request going through in debug so I think this is an issue with my Apache configuration, Im open to other alternatives but Im trying to use this as a cors proxy so I do need it to have SSL and a domain

@agieocean agieocean added the Bug Bug report in proxy server label Mar 8, 2024
@abhinavsingh
Copy link
Owner

@agieocean I haven't used Apache in decades, hence I cannot vouch for correctness of this config. But, I use proxy.py to send traffic to nginx based services all the time and I haven't faced such issues yet. Since you are getting 421, I suspect its more to do with Apache configuration?

@abhinavsingh abhinavsingh added Awaiting Response Waiting for more information / response from issue creator and removed Bug Bug report in proxy server labels May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Response Waiting for more information / response from issue creator
Projects
None yet
Development

No branches or pull requests

2 participants