Prestashop 8 docker with Apache reverse proxy
Submitted by itefix on Wed, 04/12/2024 - 18:31
- Start a Prestashop 8 docker instance, ip address 10.10.10.5 port 80 in our example
- Obtain and configure cert stuff/DNS for your Apache frontend (reverse proxy) - prestashop.mydomain.com in our example
- Configure and enable virtual hosts for http with https redirection and https at your Apache frontend (reverse proxy)
<VirtualHost *:80> ServerName prestashop.mydomain.com ProxyPreserveHost On ProxyPass / http://10.10.10.5/ ProxyPassReverse / http://10.10.10.5/ RewriteEngine on RewriteCond %{SERVER_NAME} =prestashop.mydomain.com RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} </VirtualHost> <IfModule mod_ssl.c> <VirtualHost *:443> ServerName prestashop.mydomain.com ProxyPreserveHost On ProxyPass / http://10.10.10.5/ ProxyPassReverse / http://10.10.10.5/ # Headers to manage reverse proxy RequestHeader set X-Forwarded-Proto "https" RequestHeader set X-Forwarded-Port "443" CustomLog ${APACHE_LOG_DIR}/prestashop_access.log vhost_combined ErrorLog ${APACHE_LOG_DIR}/prestashop_error.log SSLCertificateFile /etc/letsencrypt/live/.... SSLCertificateKeyFile /etc/letsencrypt/live/.... </VirtualHost>
- Visit https://prestashop.mydomain.com and proceed with installation steps online. Select SSL enabled during setup.
- If you skip/forget SSL, you can update database later:
- Table ps_configuration
- PS_SSL_ENABLED --> 1
- PS_SSL_ENABLED_EVERYWHERE --> 1
- Table ps_configuration
- If you skip/forget SSL, you can update database later:
- That way, we manage to get proper access to admin and shop pages both, without any ERR_TOO_MANY_REDIRECTS problem
Featured product
Free Software Highlights
Release Announcements
- 2024-11-25 Copssh client 8.0.0
- 2024-11-17 OpenSSL tool 2.0.1
- 2024-11-17 Wrbldnsd 5.0.2