Closed marceloschmidt closed 5 years ago
Your config is ok, I think it's (another) Prestashop Issue : https://www.prestashop.com/forums/topic/491070-ssl-broken-on-default-instalation-and-theme/
I agree with @khena, this is likely related to PrestaShop. I worked on that issue a few months ago (https://github.com/PrestaShop/PrestaShop/pull/7686).
Because I reached my shop via http://localhost, I did not have to use the SSL protocol and did not check the backoffice. But this issue should not occur on your front-office.
Why use nginx? You can easily derive from the image and add the ssl config
FROM prestashop/prestashop:1.7.2.4
LABEL maintainer="ZiaxDK <ziaxdk@gmail.com>"
RUN a2enmod ssl
RUN chmod 777 -R /var/www/html
and apache config
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
SSLCertificateFile /etc/ssl/certs/cert.pem
SSLCertificateKeyFile /etc/ssl/private/cert.key
</VirtualHost>
@ziaxdk Don't you find RUN chmod 777 -R /var/www/html
dangerous? Why would that be needed?
I was able to get around this by running the following script in mysql:
use prestashop
SELECT NAME, VALUE FROM ps_configuration WHERE NAME IN ('PS_SSL_ENABLED', 'PS_SSL_ENABLED_EVERYWHERE');
UPDATE ps_configuration SET VALUE = '1' WHERE NAME IN ('PS_SSL_ENABLED', 'PS_SSL_ENABLED_EVERYWHERE');
SELECT NAME, VALUE FROM ps_configuration WHERE NAME IN ('PS_SSL_ENABLED', 'PS_SSL_ENABLED_EVERYWHERE');
Has this issue been fixed?
@khouloudbelguith Could you try to reproduce it ?
Hi @marionf,
I tried with local PS1.7.6.0.
I have the same error logjquery-1.11.0.min.js:3 Mixed Content: The page at 'https://localhost/QA/prestashop/prestashop_1.7.6.0/admin-dev/index.php?controller=AdminOrders&token=0df45afdc18d657b1997221d3f444baa' was loaded over HTTPS, but requested an insecure image 'http://doc.prestashop.com/download/attachments/51184914/orders-orders001-list.png?version=1&modificationDate=1477580614000&api=v2'. This content should also be served over HTTPS.
In fact, this issue is reported in this ticket: https://github.com/PrestaShop/PrestaShop/issues/9807
Thanks!
Duplicate of PrestaShop/PrestaShop#9807
I was able to get around this by running the following script in mysql:
use prestashop SELECT NAME, VALUE FROM ps_configuration WHERE NAME IN ('PS_SSL_ENABLED', 'PS_SSL_ENABLED_EVERYWHERE'); UPDATE ps_configuration SET VALUE = '1' WHERE NAME IN ('PS_SSL_ENABLED', 'PS_SSL_ENABLED_EVERYWHERE'); SELECT NAME, VALUE FROM ps_configuration WHERE NAME IN ('PS_SSL_ENABLED', 'PS_SSL_ENABLED_EVERYWHERE');
Thank you very much !!!! it works for me. I have been looking for a solution all day .. THANK YOU
I was able to get around this by running the following script in mysql:
use prestashop SELECT NAME, VALUE FROM ps_configuration WHERE NAME IN ('PS_SSL_ENABLED', 'PS_SSL_ENABLED_EVERYWHERE'); UPDATE ps_configuration SET VALUE = '1' WHERE NAME IN ('PS_SSL_ENABLED', 'PS_SSL_ENABLED_EVERYWHERE'); SELECT NAME, VALUE FROM ps_configuration WHERE NAME IN ('PS_SSL_ENABLED', 'PS_SSL_ENABLED_EVERYWHERE');
Thank you very much !!!! it works for me. I have been looking for a solution all day .. THANK YOU
Wanted to add - this worked perfectly for a docker-compose version of Prestashop running behind NGINX Proxy Manager. Back office was loading fine, but front office was getting the "too many redirects" error. This solved that problem on latest version of Prestashop 8.
hi, i solved using update (sql) and add config in nginx (proxy reverse):
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
then my nginx location:
location / {
resolver 127.0.0.11 valid=30s;
proxy_pass http://DOMAIN.COM;
proxy_http_version 1.1;
proxy_set_header Host DOMAIN.COM;
index index.html index.php;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
#FULL PATH CONTENT PS:
root /var/lib/docker/volumes/MY_VOLUME_DOCKER/_data;
proxy_pass_request_headers on;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
}
i configure ps docker with componse, then ip in componser
and ip docker container in /etc/hosts 10.11.11.15 is example.
10.11.11.15 domain.com
-- my config: i use ps docker with componse ssl letscript nginx . server ubuntu.
I'm running PrestaShop v 1.7.1.2 via Docker.
When I try to enable SSL, by clicking the "Please, click here to check if your store supports SSL", the browser correctly redirects to https and loads the admin, but it never passes the check. If I check my console for log messages I find this:
Could this be the reason?
If you need further information, read on :)
I run PrestaShop with docker-compose. Here's the relevant part:
As you can imagine, I use nginx as a reverse-proxy to my docker containers. Here's the nginx part for the prestashop container:
Hopefully that's enough information to get started ;)