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

php not setting HTTPS #1

Open
ck-on opened this issue Mar 16, 2013 · 5 comments
Open

php not setting HTTPS #1

ck-on opened this issue Mar 16, 2013 · 5 comments
Assignees

Comments

@ck-on
Copy link

ck-on commented Mar 16, 2013

Any insight why HTTPS is not working? HOST host and remote ip are properly working.

nginx.conf:
proxy_set_header X-Forwarded-Proto $scheme;

apache httpd.conf:
RPAFsethttps On

phpinfo:
_SERVER["HTTP_X_FORWARDED_PROTO"] https
_ENV["HTTP_X_FORWARDED_PROTO"] https

but this does NOT appear
_SERVER["HTTPS"]

Note that everything else works fine via the proxy, hostname, remoteip etc.
The remote_addr is being set to the _SERVER["HTTP_X_REAL_IP"]

What's strange is the port is also being changed
_SERVER["SERVER_PORT"] 443

but I have
RPAFsetport Off

so that should not even be set
in fact I am not even forwarding the port info via prox_set_header

so something else is changing it to 443 and there is nothing in the _server or _env variables that show 443

Is this possible a php-fpm issue where it will not properly set HTTPS ?

@y-ken
Copy link
Owner

y-ken commented Mar 16, 2013

It is sorry for wrong behavior.

Would you please check reproducibility with similar modules and tell me the result?
Because, this module is based on these two fork of mod_rpaf.

https://github.com/ttkzw/mod_rpaf-0.6
https://github.com/gnif/mod_rpaf

@ck-on
Copy link
Author

ck-on commented Mar 16, 2013

Unfortunately those do not try to handle X-Forwarded-Proto like you do.

I think I will try this in httpd.conf

SetEnvIf X-Forwarded-Proto https HTTPS=on

and see if php-fpm will obey it, but maybe not

by the way, thank you for your work on modifying mod_rpaf, I appreciate it

@y-ken
Copy link
Owner

y-ken commented Mar 16, 2013

Thank you for your quick reply.
In the case of problem, please show me the middleware(architecture) overview and whole of configuration with gist.

I am looking forward to hearing from you.

@or1can
Copy link

or1can commented Sep 11, 2014

I've had the same problem. Switching to the current release of https://github.com/gnif/mod_rpaf solved it. From their issue tracker it looks like an issue with mod_rewrite - gnif/mod_rpaf#6

@y-ken
Copy link
Owner

y-ken commented Sep 12, 2014

Hi @or1can

I'm sorry I have misread.
It should be merged these feature. Thank you!

@y-ken y-ken self-assigned this Sep 12, 2014
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

3 participants