Jump to content

Operate PrestaShop 1.5.2 completely via SSL


Klaus.Schleiter

Recommended Posts

I have setup PrestaShop 1.5.2 within the environment of an university to sell publications of the institute I am working for.

To access the shop from outside it is required to completely operate the shop via SSL. There is a Gateway that filters all incoming http traffic.

I have seen the topic http://forge.prestas...owse/PSCFI-4647 but that does not work for me. It seems that this is only valid for 1.4.x versions of the shop.

My I ask for a guideline what needs to be done to operate the shop completely via SSL?

Thank you in advance for any advice.

 

I forgot to mention that the system is based on FreeBSD 8.2 with Apache 2.2. A Rewrite directive out of Apache is set, but does not get active since the gateway stops all HTTP traffic.

Edited by Klaus.Schleiter (see edit history)
Link to comment
Share on other sites

I think I have found a solution (at least for my shop):

Since I have a German installation, I will give the menus in German language.

  1. Open Voreinstellungen -> SEO & URLs

    1. Define the SSL Domain. In my case it is identical with Shop Domain.
    2. Save the settings

[*]Open Voreinstellungen -> Allgemein

  1. Activate SSL aktivieren
  2. Save the settings

[*]Open phpmyadmin and open the database used for PrestaShop

  1. Open the table ps_configuration
  2. Select the parameter named PS_SSL_ENABLED and set it from 0 to 1

[*]On the web server change into the base directoy where PrestaShop is located (/usr/local/www/prestashop in my case).

  1. Führe die folgende Änderungen durch:



./classes/Link.php:95: //KS SSL Support: $url = 'http://'.$shop->domain.$shop->getBaseURI().$this->getLangLink($id_lang);
./classes/Link.php:96: $url = ($this->ssl_enable ? _PS_BASE_URL_SSL_ : _PS_BASE_URL_).$shop->getBaseURI().$this->getLangLink($id_lang); //KS SSL Support
./classes/Link.php:157: //KS SSL Support: $url = _PS_BASE_URL_.__PS_BASE_URI__.$this->getLangLink($id_lang);
./classes/Link.php:158: $url = ($this->ssl_enable ? _PS_BASE_URL_SSL_ : _PS_BASE_URL_).__PS_BASE_URI__.$this->getLangLink($id_lang); //KS SSL Support
./classes/Link.php:196: //KS SSL Support: $url = _PS_BASE_URL_.__PS_BASE_URI__.$this->getLangLink($id_lang);
./classes/Link.php:197: $url = ($this->ssl_enable ? _PS_BASE_URL_SSL_ : _PS_BASE_URL_).__PS_BASE_URI__.$this->getLangLink($id_lang); //KS SSL Support
./classes/Link.php:223: //KS SSL Support: $base = (($ssl && $this->ssl_enable) ? _PS_BASE_URL_SSL_ : _PS_BASE_URL_);
./classes/Link.php:224: $base = ($this->ssl_enable ? _PS_BASE_URL_SSL_ : _PS_BASE_URL_); //KS SSL Support
./classes/Link.php:263: //KS SSL Support: $url = _PS_BASE_URL_.__PS_BASE_URI__.$this->getLangLink($id_lang);
./classes/Link.php:264: $url = ($this->ssl_enable ? _PS_BASE_URL_SSL_ : _PS_BASE_URL_).__PS_BASE_URI__.$this->getLangLink($id_lang); //KS SSL Support
./classes/Link.php:291: //KS SSL Support: $url = _PS_BASE_URL_.__PS_BASE_URI__.$this->getLangLink($id_lang);
./classes/Link.php:292: $url = ($this->ssl_enable ? _PS_BASE_URL_SSL_ : _PS_BASE_URL_).__PS_BASE_URI__.$this->getLangLink($id_lang); //KS SSL Support
./classes/Link.php:318: //KS SSL Support: $base = (($ssl && $this->ssl_enable) ? _PS_BASE_URL_SSL_ : _PS_BASE_URL_);
./classes/Link.php:319: $base = ($this->ssl_enable ? _PS_BASE_URL_SSL_ : _PS_BASE_URL_); //KS SSL Support
./classes/Link.php:425: //KS SSL Support: $url = ($ssl && $this->ssl_enable) ? Tools::getShopDomainSsl(true) : Tools::getShopDomain(true);
./classes/Link.php:426: $url = $this->ssl_enable ? Tools::getShopDomainSsl(true) : Tools::getShopDomain(true); //KS SSL Support

 

It is required to restart the Apache Webserver. I would appreciate comments on this solution since I am not sure whether this is generally working. I am a beginner with PrestaShop.

Edited by Klaus.Schleiter (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...