Hello everybody,
I have just updated my emoncms to the version 5. Everything is ok when using emoncms with http. When trying to use it through https, I have the login page but login failed with an empty red box. On the previous version, it worked fine
Thank you in advance for your help.
Re: emoncms (https and redirection)
Hi Nicolas
To get back working, do the following;
$ sudo nano /var/www/emoncms/settings.php
and paste the code attached below, just above the entry;
// Default controller and action if none are specified and user is anonymous
Save the settings.php and reboot.
Re: emoncms (https and redirection)
I believe this should not be necessary with latest revisions.
Re: emoncms (https and redirection)
Jérôme, I presume that Nicolas was using the last but one commit, which made the changes to the route in default.settings.php
The file was changed again about a week later, to ensure that emoncms upgraded seamlessly from previous versions.
I guess that if he did a fresh git pull, the current version would now correct the problem.
Paul
Re: emoncms (https and redirection)
Yes, I think so.
I was mentioning this to avoid anyone with the same symptoms in the future bothering with settings.php edition.
Re: emoncms (https and redirection)
Hello,
First, thank you very much for your support. I have tested your fix but it does not work. I forget to tell you how I connect with https. I access with a url like this : https://emoncms.mydomain.com/. I don't use the subfolder emoncms. Is it a bad idea ?
Is it possible to use emoncms with this url ?
Thank you in advance.
Nicolas HAHANG
Re: emoncms (https and redirection)
Hi.
Sorry, I replied to Paul's reply but overlooked your initial message.
It never worked on my own server with https but this is due to my own apache config. And it does not seem to work on my Pi with latest version, but this could have many reasons. I'm afraid I can't help.
Re: emoncms (https and redirection)
Hi Nicolas, in order to be of some help you should post the virtual host (or default) config you are using, both for http and https.
After that you should try and perform the login in chrome with the developer window open on the network tab, and post the result of the ajax call that is being made when you press the login button (firefox andd firebug will work as well)
One thing you could try in the meantime is setting the $path variable to "/" in index.php, but I'm not sure it will be used when processing ajax calls (actually I'm pretty sure it won't but setting it won't hurt and will make all the ajax calls work as well)
Regards
Re: emoncms (https and redirection)
Hello,
This is my virtual host config https:
<VirtualHost 192.168.1.8:443>
DocumentRoot "/share/Web/emoncms"
ServerName emoncms.mydomain.name
SSLEngine on
SSLCipherSuite ALL:!SSLv2:!LOW:!EXPORT40:@STRENGTH
SSLCertificateFile "/etc/stunnel/stunnel.pem"
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "/usr/local/apache/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
BrowserMatch ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
CustomLog "/usr/local/apache/logs/ssl_request_log" \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
SSLProxyEngine on
SSLVerifyClient require
SSLVerifyDepth 1
SSLCACertificateFile /share/MD0_DATA/Private/ca.crt
</VirtualHost>
for http :
<VirtualHost _default_:80>
DocumentRoot "/share/Web"
</VirtualHost>
I have the following response in the developper window in chrome :
login.json (/user)