Debug PrestaShop errors
NOTE: We are in the process of modifying the file structure and configuration for many Bitnami stacks. On account of these changes, the file paths stated in this guide may change depending on whether your Bitnami stack uses native Linux system packages (Approach A), or if it is a self-contained installation (Approach B). To identify your Bitnami installation type and what approach to follow, run the command below:
$ test ! -f "/opt/bitnami/common/bin/openssl" && echo "Approach A: Using system packages." || echo "Approach B: Self-contained installation."
The output of the command indicates which approach (A or B) is used by the installation, and will allow you to identify the paths, configuration and commands to use in this guide. Refer to the FAQ for more information on these changes.
Troubleshoot URL issues
If friendly URLs are not working, this is a common issue after updating the IP address/domain of Prestashop as explained in this section.
In order to workaround this issue, you must adapt the .htaccess configuration. That way, the different redirect/rewrite rules defined point to the right hostname.
Approach A: Bitnami installations using system packages
Follow the steps in this section to update the domain/IP address of your PrestaShop site. This will write the proper value of the domain or IP address to PrestaShop’s /opt/bitnami/prestashop/.htaccess file.
Approach B: Self-contained Bitnami installations
Follow these steps:
Obtain the current domain configured by running the command:
$ grep "PrestaShop current domain" /opt/bitnami/apps/prestashop/conf/htaccess.conf
Update the domain by running the command below:
NOTE: Replace the placeholders OLD_DOMAIN, and NEW_DOMAIN with the values obtained from the previous command, and with the new value you have chosen when updating the hostname on Prestashop, respectively.
$ sed -e "s/OLD_DOMAIN/NEW_DOMAIN/g" /opt/bitnami/apps/prestashop/conf/htaccess.conf
$ sudo /opt/bitnami/ctlscript.sh restart apache