Description: I am seeking an experienced System Administrator to help resolve a persistent redirect issue that is blocking access to my Magento 2.4 site. The issue arose after an SSL certificate update, and it was later discovered that Varnish and Redis configurations were also contributing to the problem. The development environment, which does not use Varnish and Redis, is working fine, while the live instance, which uses these services, is experiencing the redirect issue.
Situation Overview:
SSL Certificate Update: The issue started after updating the SSL certificate with Let's Encrypt. During the certificate validation process, I added the _acme_challenge token to `robot.hetzner.com` for certificate verification. After the SSL certificate was updated, the domain redirects malfunctioned, resulting in an endless loop. Even after removing the _acme_challenge tokens, the issue persisted. Initially, I suspected that it could be related to SSL misconfiguration.
Varnish and Redis Configuration: While investigating the issue, I discovered that Varnish was not functioning correctly due to a port conflict with Plesk’s admin interface, both attempting to use port 8443. I resolved the issue by changing Varnish’s configuration, updating its ports to 6082 and 6081, which fixed the port conflict. After this change, Varnish started working correctly. Redis, on the other hand, was running without any issues. However, Varnish, which is crucial for redirects, could still be affecting the redirect behavior.
Magento 2.4 Redirect Table: To rule out issues with Magento’s redirect table, I cleared it, but the problem persisted even after removing all entries. This indicates that the issue is not originating from Magento’s redirect table.
Server Domains: It is important to note that other domains hosted on the same server are working perfectly, and they have not encountered any issues with redirects. These domains are configured in the exact same way as the problematic domain and have been running without issue for several years. All domains are configured through the Hetzner robot and utilize Let's Encrypt for SSL certificates. Therefore, the issue seems to be isolated to the specific domain experiencing the redirect problem, despite identical configurations across all domains.
Suspected Issues: The issue is likely caused by one or more of the following:
A misconfiguration in the SSL certificate, particularly related to the Let's Encrypt process and handling of the _acme_challenge token. A conflict or misconfiguration between Varnish and Redis, especially after resolving the port conflict with Plesk. A server-related issue, possibly introduced during an automatic update, affecting Varnish, Redis, or related services such as Nginx or Apache.
htaccess Files: Both the dev and live instances have identical htaccess files. The issue is not related to the htaccess configuration but may be influenced by server-side configurations such as Varnish, Redis, or SSL handling.
Task: The goal is to investigate and resolve the domain redirect issue that is preventing Magento from working correctly.
Key tasks include: Checking Varnish, Redis, Nginx, and Apache configurations for any misconfigurations or conflicts, particularly concerning the SSL certificate and port issues. Verifying the SSL certificate configuration, focusing on the Let's Encrypt process, to ensure there are no issues with the validation tokens. Ensuring Magento’s redirect handling is functioning as expected, confirming that the issue is not due to the htaccess configuration. Resolving any potential conflicts between Varnish, Redis, and Apache/Nginx services that might be affecting the redirect behavior.
Requirements: Proven experience as a System Administrator, particularly with Varnish, Redis, Nginx, Apache, and SSL certificates (Let's Encrypt). Strong troubleshooting skills in SSL certificate issues, domain redirects, and server configurations. Ability to quickly diagnose and resolve conflicts between Varnish, Redis, Nginx/Apache, and SSL certificates.
Key Notes: The issue likely began after the SSL certificate update, which may have caused problems with domain redirects. Varnish and Redis configurations were checked, and the port conflict with Plesk was resolved by updating Varnish’s ports. Magento’s redirect table was cleared, and htaccess files have remained unchanged for several months, suggesting the problem is not due to Magento itself. A configuration issue with Varnish, Redis, Nginx, Apache, or SSL certificates may be the root cause.