(gs):Resolve PrestaShop Port 443 in HTTP error
- This page was last modified on March 3, 2011, at 11:44.
From (mt) Community Wiki
Contents |
Overview
The following SSH commands will help correct a problem, where certain CMS systems (PrestaShop) include a variable that ends up converting HTTP links to include Port 443.
Requirements
The following steps assume you're familiar with using SSH. If you need help understanding SSH, please see these links:
Instructions
First, start by backing up the content of your site by running the following command:
cd ~/domains/ && tar -zcvf ~/data/domain.com.tar.gz domain.com/
The above command will put a backup of the whole domain in the /data folder of your account.
Once the above process is complete, run the next command to replace all instances of "HTTP_HOST" with "SERVER_NAME".
cd ~/domains/domain.com && find . -type f -exec sed -i "s/HTTP_HOST/SERVER_NAME/g" {} \;
The command above replaces the HTTP_HOST variable with the SERVER_NAME variable. This will be performed on all files using this instance. The HTTP_HOST variable is seen by the Apache server as a variable where post HTTPS link processing must be replaced with the 443 port. For example: (http://domain.com:443)
Make sure you replace domain.com with the appropriate domain you're backing up and modifying.