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

FastCGI sets SERVER_PORT to the local port instead of the server port #67

Open
stefanofornari opened this issue Feb 25, 2023 · 1 comment

Comments

@stefanofornari
Copy link

stefanofornari commented Feb 25, 2023

In

, which in turns call , FastGCI sets SERVER_PORT to the local port. This does not work when the container is behind a proxy or a NAT.
If for example you are natting your more router so that the external port is 80, but you run your service on a tomcat on port 8080, SERVER_PORT should be set 80, not 8080. To do so, FastCGI should pic the server port (req.getServerPort()) and may be fall back on req.getLocalPort(), not the other way around.

@stefanofornari
Copy link
Author

I fixed it here: https://github.com/stefanofornari/php-java-bridge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant