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

Doesn't work on SSL #16

Closed
scottyp89 opened this issue Nov 29, 2016 · 11 comments
Closed

Doesn't work on SSL #16

scottyp89 opened this issue Nov 29, 2016 · 11 comments

Comments

@scottyp89
Copy link

scottyp89 commented Nov 29, 2016

I have this setup with a valid wildcard SSL certificate, but when accessing on HTTPS the only return I get is:

false

However I have just noticed that list sites on this controller does actually return information.

@malle-pietje
Copy link
Collaborator

malle-pietje commented Nov 29, 2016

Then probably the login is not successful. This tool should work with SSL without any issues.
Maybe you can enable the debug mode from the config.php file and share the relevant output from that?
ssl
This controller is using a Letsencrypt cert and works fine with the API client class...

@scottyp89
Copy link
Author

Enabling debug doesn't return anything additional. Having the controller on HTTPS is fine, but since I put the API browser on HTTPS, it doesn't work. I have the API browser site accessible on HTTP and HTTPS, it works fine in HTTP but not HTTPS.

@malle-pietje
Copy link
Collaborator

I see what you mean. I've never tried that myself, what does the browser console tell you?

@malle-pietje
Copy link
Collaborator

Or else have a look at your PHP error log (often this is your web server error log)?

@scottyp89
Copy link
Author

scottyp89 commented Nov 29, 2016

Just pulled this from the error log:

[Tue Nov 29 13:15:26.618268 2016] [:error] [pid 30205] [client [omitted]:64264] curl error: Failed to connect to 127.0.0.1 port 8443: Connection refused, referer: https://[omitted]/admin/index.php

Nothing showed up in the browser console unfortunately.

@malle-pietje
Copy link
Collaborator

malle-pietje commented Nov 29, 2016

Looks as if the controller details are not stored in the $_SESSION variable since 127.0.0.1 is the default url as defined in the class. Did you try to clean browser cookies or use a different browser?

@scottyp89
Copy link
Author

Trying a different browser (now using FireFox in Private mode) I can't even select a site from the Sites drop down.

@malle-pietje
Copy link
Collaborator

Weird. Unfortunately I don't have time at the moment to recreate this issue in my set up. I'll check as soon as I have the time and will report back.

@scottyp89
Copy link
Author

No problem, thanks!

Just to give you some more info I've checked the error log since using FireFox and get a few events logged simultaneously:

[Tue Nov 29 13:32:02.971068 2016] [:error] [pid 32176] [client [omitted]:65276] PHP Warning: is_readable(): open_basedir restriction in effect. File(config.php) is not within the allowed path(s): (/var/sentora/hostdata/[omitted]/public_html/[omitted]:/var/sentora/temp/) in /var/sentora/hostdata/[omitted]/public_html/[omitted]/admin/index.php on line 62, referer: https://[omitted]/admin/ [Tue Nov 29 13:32:02.971169 2016] [:error] [pid 32176] [client [omitted]:65276] PHP Notice: Undefined variable: controlleruser in /var/sentora/hostdata/[omitted]/public_html/[omitted]/admin/index.php on line 127, referer: https://[omitted]/admin/ [Tue Nov 29 13:32:02.971177 2016] [:error] [pid 32176] [client [omitted]:65276] PHP Notice: Undefined variable: controllerpassword in /var/sentora/hostdata/[omitted]/public_html/[omitted]/admin/index.php on line 128, referer: https://[omitted]/admin/ [Tue Nov 29 13:32:02.971181 2016] [:error] [pid 32176] [client [omitted]:65276] PHP Notice: Undefined variable: controllerurl in /var/sentora/hostdata/[omitted]/public_html/[omitted]/admin/index.php on line 129, referer: https://[omitted]/admin/ [Tue Nov 29 13:32:02.971185 2016] [:error] [pid 32176] [client [omitted]:65276] PHP Notice: Undefined variable: controllerversion in /var/sentora/hostdata/[omitted]/public_html/[omitted]/admin/index.php on line 132, referer: https://[omitted]/admin/ [Tue Nov 29 13:32:02.971472 2016] [:error] [pid 32176] [client [omitted]:65276] curl error: Failed to connect to 127.0.0.1 port 8443: Connection refused, referer: https://[omitted]/admin/ [Tue Nov 29 13:32:02.971562 2016] [:error] [pid 32176] [client [omitted]:65276] PHP Warning: usort() expects parameter 1 to be array, boolean given in /var/sentora/hostdata/[omitted]/public_html/[omitted]/admin/index.php on line 556, referer: https://[omitted]/admin/ [Tue Nov 29 13:32:02.971570 2016] [:error] [pid 32176] [client [omitted]:65276] PHP Warning: Invalid argument supplied for foreach() in /var/sentora/hostdata/[omitted]/public_html/[omitted]/admin/index.php on line 558, referer: https://[omitted]/admin/

Looks to me like a permissions issue but I've set all files to 777 and it is still coming back with the same problem.

@scottyp89
Copy link
Author

scottyp89 commented Nov 29, 2016

This was an Apache config issue after looking into the errors above, your code works fine :)

I've had to add the following to my https.conf file in Apache:

<DirectoryMatch "/full/path/to/site/dir">
    php_admin_value open_basedir "/full/path/to/site/dir"
</DirectoryMatch>

Thanks for your help and sorry for wasting your time!

@malle-pietje
Copy link
Collaborator

Thanks for the feedback, can be useful for others running into the same issue:-)

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

2 participants