nibe Posted November 15, 2018 Share Posted November 15, 2018 I use nginx server and Prestashop 1.7.4.4 on a centos7, php5.6 is also installed. I configure nginx to serve 3 website, one in wordpress, one is a proxy torwards a Tomcat and one is with prestashop. Everything is fine without HTTPS. I install certbot for the certificate, and run it. It did what it has to do with the 3 sites file configuration. All sites beside prestashop now works fine and if one try to connect in HTTP is redirected to HTTPS. I install prestashop by command line like this: php index_cli.php --name=name --country=it --domain=www.namedoamin.com --db_server=127.0.0.1 --db_name=dbname --db_user=dbuser --db_password=password without https it works fine, but once I installed the certificate and redirect the traffic from http to https the browser says the infamous: The page isn’t redirecting properly There are plenty of info about this issue but none helps me. This is the block from nginx: server { server_name www.name.com; location / { root /var/www/html/website.com; index index.php index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } location ~ \.php$ { root /var/www/html/website.com; fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param QUERY_STRING $query_string; include /etc/nginx/fastcgi_params; } listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/www.namesite.com/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/www.namesite.com/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot server { if ($host = www.namesite.com) { return 301 https://$host$request_uri; } # managed by Certbot server_name www.namesite.com; listen 80; return 404; # managed by Certbot } If I go in admin section it works in HTTPS, but if i try to go in settings/general it gives me 404 not found, very weird! I have no idea what to do anymore I'm desperate, I try all the tricks I red on internet before posting. Link to comment Share on other sites More sharing options...
siddharthpatil Posted December 13, 2018 Share Posted December 13, 2018 I have followed following tutorial https://linux4one.com/secure-nginx-with-lets-encrypt-ssl-on-centos-7 but the thing is that I have done it with php7.2, MariaDB and Nginx Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now