{"id":2644,"date":"2025-03-07T16:05:33","date_gmt":"2025-03-07T08:05:33","guid":{"rendered":"https:\/\/www.ruianding.com\/blog\/?p=2644"},"modified":"2025-03-21T17:46:40","modified_gmt":"2025-03-21T09:46:40","slug":"apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience","status":"publish","type":"post","link":"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/","title":{"rendered":"Apache Reverse Proxy and Certbot SSL: A Troubleshooting Experience"},"content":{"rendered":"\n<p>Recently, I set up my web applications behind an Apache reverse proxy with SSL provided by Certbot. I faced several challenges along the way\u2014from conflicting default pages to browser caching issues\u2014and I want to share my experience and final solution to help anyone facing similar problems.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Background<\/h2>\n\n\n\n<p>I had two internal applications that I needed to expose securely:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>dify.ruianding.com:<\/strong> My application running on an internal port <code>27360<\/code> needed to be reverse proxied to this domain on port 443.<\/li>\n\n\n\n<li><strong>json.ruianding.com:<\/strong> Another application running on port <code>8888<\/code> should be accessible via this domain on port 443, with all requests automatically redirected from the root to <code>\/editor<\/code>.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-pale-cyan-blue-background-color has-background\"><strong>Note:<\/strong> My applications are running inside Docker containers on my local client machine. I use Apache as a reverse proxy to forward requests from these containers to the public domain, enhancing security by not exposing container ports directly.<\/p>\n\n\n\n<p>Initially, I used FRP to map internal ports to public ports, but to enhance security, I decided to only expose the applications through Apache reverse proxy and handle SSL with Certbot.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">The Issues I Encountered<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Apache Default Page Conflict<\/h3>\n\n\n\n<p>When I first configured Apache for <strong>dify.ruianding.com<\/strong>, I encountered an unexpected behavior: despite having a custom reverse proxy configuration, accessing the domain still showed Apache\u2019s default page.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"453\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2025\/03\/image-2-1024x453.png\" alt=\"\" class=\"wp-image-2645\" srcset=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2025\/03\/image-2-1024x453.png 1024w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2025\/03\/image-2-300x133.png 300w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2025\/03\/image-2-768x340.png 768w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2025\/03\/image-2-1536x680.png 1536w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2025\/03\/image-2.png 1974w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><br><strong>Investigation:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>I discovered that Certbot automatically generated a default virtual host configuration file (<code>dify-le-ssl.conf<\/code>) for SSL, which did not include the reverse proxy settings.<\/li>\n\n\n\n<li>My custom configuration (<code>dify.conf<\/code>) also existed, but Apache was prioritizing the default certbot-generated config.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"650\" height=\"87\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2025\/03\/image-3.png\" alt=\"\" class=\"wp-image-2646\" srcset=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2025\/03\/image-3.png 650w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2025\/03\/image-3-300x40.png 300w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">2. Browser Caching Problems<\/h3>\n\n\n\n<p>After making adjustments to disable the default site, I still couldn\u2019t see the correct page on my desktop browser. Switching to my phone revealed the intended content.<br><strong>Conclusion:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The issue was ultimately due to browser cache. Clearing the cache or using an incognito window resolved the problem.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3. Concerns about Certbot Renewal<\/h3>\n\n\n\n<p>I was also worried that by disabling the Certbot default virtual host, the certificate renewal process might fail.<br><strong>Finding:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Certbot relies on the ACME challenge response. As long as a correctly configured virtual host for the domain exists (i.e., one that handles the <code>\/.well-known\/acme-challenge\/<\/code> requests), renewal proceeds without issue.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Final Solution and Configuration<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">A. Configuring dify.ruianding.com<\/h3>\n\n\n\n<p>I merged the necessary reverse proxy directives into the SSL virtual host configuration. For example, my final <code>\/etc\/apache2\/sites-enabled\/dify-le-ssl.conf<\/code> looked like this:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"xml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;IfModule mod_ssl.c>\n&lt;VirtualHost *:443>\n    ServerName dify.ruianding.com\n\n    SSLEngine on\n    SSLCertificateFile \/etc\/letsencrypt\/live\/dify.ruianding.com\/fullchain.pem\n    SSLCertificateKeyFile \/etc\/letsencrypt\/live\/dify.ruianding.com\/privkey.pem\n    Include \/etc\/letsencrypt\/options-ssl-apache.conf\n\n    # Reverse proxy configuration: forward requests to internal port 27360\n    ProxyPreserveHost On\n    ProxyPass \/ http:\/\/127.0.0.1:27360\/\n    ProxyPassReverse \/ http:\/\/127.0.0.1:27360\/\n&lt;\/VirtualHost>\n&lt;\/IfModule>\n<\/pre>\n\n\n\n<p>I ensured that the necessary Apache modules were enabled:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bat\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo a2enmod proxy proxy_http ssl rewrite\nsudo systemctl reload apache2\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">B. Configuring json.ruianding.com with a Redirection to <code>\/editor<\/code><\/h3>\n\n\n\n<p>For <strong>json.ruianding.com<\/strong>, I created a separate virtual host file (e.g., <code>\/etc\/apache2\/sites-enabled\/json.ruianding.com.conf<\/code>) with both HTTP and HTTPS configurations:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"xml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;VirtualHost *:80>\n    ServerName json.ruianding.com\n    # Redirect HTTP to HTTPS\n    RewriteEngine On\n    RewriteRule ^ https:\/\/%{HTTP_HOST}%{REQUEST_URI} [L,R=301]\n&lt;\/VirtualHost>\n\n&lt;VirtualHost *:443>\n    ServerName json.ruianding.com\n\n    SSLEngine on\n    SSLCertificateFile \/etc\/letsencrypt\/live\/json.ruianding.com\/fullchain.pem\n    SSLCertificateKeyFile \/etc\/letsencrypt\/live\/json.ruianding.com\/privkey.pem\n    Include \/etc\/letsencrypt\/options-ssl-apache.conf\n\n    # Redirect root requests to \/editor\n    RewriteEngine On\n    RewriteCond %{REQUEST_URI} ^\/$\n    RewriteRule ^\/?$ https:\/\/%{HTTP_HOST}\/editor [R=301,L]\n\n    # Reverse proxy configuration: forward requests to internal port 8888\n    ProxyPreserveHost On\n    ProxyPass \/ http:\/\/127.0.0.1:8888\/\n    ProxyPassReverse \/ http:\/\/127.0.0.1:8888\/\n\n    ErrorLog ${APACHE_LOG_DIR}\/json_error.log\n    CustomLog ${APACHE_LOG_DIR}\/json_access.log combined\n&lt;\/VirtualHost>\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">C. Using Certbot for SSL Certificates and Auto-Renewal<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">1. Install Certbot and Apache Plugin<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt update\nsudo apt install certbot python3-certbot-apache\n<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">2. Obtain SSL Certificates<\/h4>\n\n\n\n<p>Run the following command for each domain. For example, for <strong>json.ruianding.com<\/strong>:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo certbot --apache -d json.ruianding.com<\/pre>\n\n\n\n<p>During the process, you\u2019ll be prompted to enter your email, agree to the terms, and choose whether to redirect HTTP to HTTPS (choose to redirect).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3. Test Auto-Renewal<\/h4>\n\n\n\n<p>After obtaining the certificates, test the auto-renewal process:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo certbot renew --dry-run<\/pre>\n\n\n\n<p>If the test runs successfully, Certbot will handle certificate renewals automatically.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>In summary, I resolved the issues by:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Disabling the unwanted Certbot-generated default virtual host to ensure the custom reverse proxy configuration was used.<\/li>\n\n\n\n<li>Clearing browser cache to see the updated content.<\/li>\n\n\n\n<li>Verifying that disabling the default page did not affect the Certbot renewal process, as the active virtual host correctly handled the ACME challenges.<\/li>\n<\/ul>\n\n\n\n<p>This experience taught me the importance of carefully managing virtual host configurations and remembering that sometimes the simplest issues\u2014like browser caching\u2014can cause a lot of headaches. I hope this blog post helps others in navigating similar challenges when setting up Apache reverse proxies with Certbot SSL.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently, I set up my web applications behind an Apache reverse proxy with SSL provided by Certbot. I faced several challenges along the way\u2014from conflicting default pages to browser caching issues\u2014and I want to share my experience and final solution to help anyone facing similar problems. Background I had two internal applications that I needed [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[1],"tags":[71,70],"class_list":["post-2644","post","type-post","status-publish","format-standard","hentry","category-miscellaneous","tag-apache","tag-frp"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Apache Reverse Proxy and Certbot SSL: A Troubleshooting Experience - \u6781\u7b80IT\uff5cSimpleIT<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Apache Reverse Proxy and Certbot SSL: A Troubleshooting Experience - \u6781\u7b80IT\uff5cSimpleIT\" \/>\n<meta property=\"og:description\" content=\"Recently, I set up my web applications behind an Apache reverse proxy with SSL provided by Certbot. I faced several challenges along the way\u2014from conflicting default pages to browser caching issues\u2014and I want to share my experience and final solution to help anyone facing similar problems. Background I had two internal applications that I needed [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/\" \/>\n<meta property=\"og:site_name\" content=\"\u6781\u7b80IT\uff5cSimpleIT\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-07T08:05:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-21T09:46:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2025\/03\/image-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1974\" \/>\n\t<meta property=\"og:image:height\" content=\"874\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ruian Ding\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ruian Ding\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/\"},\"author\":{\"name\":\"Ruian Ding\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b\"},\"headline\":\"Apache Reverse Proxy and Certbot SSL: A Troubleshooting Experience\",\"datePublished\":\"2025-03-07T08:05:33+00:00\",\"dateModified\":\"2025-03-21T09:46:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/\"},\"wordCount\":606,\"publisher\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b\"},\"image\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2025\/03\/image-2-1024x453.png\",\"keywords\":[\"APACHE\",\"FRP\"],\"articleSection\":[\"Miscellaneous\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/\",\"url\":\"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/\",\"name\":\"Apache Reverse Proxy and Certbot SSL: A Troubleshooting Experience - \u6781\u7b80IT\uff5cSimpleIT\",\"isPartOf\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2025\/03\/image-2-1024x453.png\",\"datePublished\":\"2025-03-07T08:05:33+00:00\",\"dateModified\":\"2025-03-21T09:46:40+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/#primaryimage\",\"url\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2025\/03\/image-2.png\",\"contentUrl\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2025\/03\/image-2.png\",\"width\":1974,\"height\":874},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.ruianding.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Apache Reverse Proxy and Certbot SSL: A Troubleshooting Experience\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/#website\",\"url\":\"https:\/\/www.ruianding.com\/blog\/\",\"name\":\"Ruian's Tech Troubleshooting Toolbox\",\"description\":\"Debug the World.\",\"publisher\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b\"},\"alternateName\":\"\u4e01\u777f\u5b89\u7684\u6280\u672f\u5206\u4eab\u535a\u5ba2\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.ruianding.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b\",\"name\":\"Ruian Ding\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png\",\"contentUrl\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png\",\"width\":284,\"height\":284,\"caption\":\"Ruian Ding\"},\"logo\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"I am currently a Support Specialist at NIO, focusing on cloud-related issues for NIO Power. Previously, at Microsoft Entra ID, I specialized in identity and access management (IAM), including device registration, Windows Hello for Business (WHfB), multi-factor authentication (MFA), and single sign-on (SSO). In addition to my core expertise, I have a strong foundation in Active Directory, Servers, Cloud Computing, Network Administration, and Front-end Web Development. This diverse technical skill set enables me to effectively handle a wide range of challenges in a fast-paced IT environment.\",\"sameAs\":[\"https:\/\/www.ruianding.com\"],\"url\":\"https:\/\/www.ruianding.com\/blog\/author\/ruiand\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Apache Reverse Proxy and Certbot SSL: A Troubleshooting Experience - \u6781\u7b80IT\uff5cSimpleIT","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/","og_locale":"en_US","og_type":"article","og_title":"Apache Reverse Proxy and Certbot SSL: A Troubleshooting Experience - \u6781\u7b80IT\uff5cSimpleIT","og_description":"Recently, I set up my web applications behind an Apache reverse proxy with SSL provided by Certbot. I faced several challenges along the way\u2014from conflicting default pages to browser caching issues\u2014and I want to share my experience and final solution to help anyone facing similar problems. Background I had two internal applications that I needed [&hellip;]","og_url":"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/","og_site_name":"\u6781\u7b80IT\uff5cSimpleIT","article_published_time":"2025-03-07T08:05:33+00:00","article_modified_time":"2025-03-21T09:46:40+00:00","og_image":[{"width":1974,"height":874,"url":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2025\/03\/image-2.png","type":"image\/png"}],"author":"Ruian Ding","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Ruian Ding"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/#article","isPartOf":{"@id":"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/"},"author":{"name":"Ruian Ding","@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b"},"headline":"Apache Reverse Proxy and Certbot SSL: A Troubleshooting Experience","datePublished":"2025-03-07T08:05:33+00:00","dateModified":"2025-03-21T09:46:40+00:00","mainEntityOfPage":{"@id":"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/"},"wordCount":606,"publisher":{"@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b"},"image":{"@id":"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/#primaryimage"},"thumbnailUrl":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2025\/03\/image-2-1024x453.png","keywords":["APACHE","FRP"],"articleSection":["Miscellaneous"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/","url":"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/","name":"Apache Reverse Proxy and Certbot SSL: A Troubleshooting Experience - \u6781\u7b80IT\uff5cSimpleIT","isPartOf":{"@id":"https:\/\/www.ruianding.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/#primaryimage"},"image":{"@id":"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/#primaryimage"},"thumbnailUrl":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2025\/03\/image-2-1024x453.png","datePublished":"2025-03-07T08:05:33+00:00","dateModified":"2025-03-21T09:46:40+00:00","breadcrumb":{"@id":"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/#primaryimage","url":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2025\/03\/image-2.png","contentUrl":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2025\/03\/image-2.png","width":1974,"height":874},{"@type":"BreadcrumbList","@id":"https:\/\/www.ruianding.com\/blog\/apache-reverse-proxy-and-certbot-ssl-a-troubleshooting-experience\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.ruianding.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Apache Reverse Proxy and Certbot SSL: A Troubleshooting Experience"}]},{"@type":"WebSite","@id":"https:\/\/www.ruianding.com\/blog\/#website","url":"https:\/\/www.ruianding.com\/blog\/","name":"Ruian's Tech Troubleshooting Toolbox","description":"Debug the World.","publisher":{"@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b"},"alternateName":"\u4e01\u777f\u5b89\u7684\u6280\u672f\u5206\u4eab\u535a\u5ba2","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.ruianding.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b","name":"Ruian Ding","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png","contentUrl":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png","width":284,"height":284,"caption":"Ruian Ding"},"logo":{"@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/image\/"},"description":"I am currently a Support Specialist at NIO, focusing on cloud-related issues for NIO Power. Previously, at Microsoft Entra ID, I specialized in identity and access management (IAM), including device registration, Windows Hello for Business (WHfB), multi-factor authentication (MFA), and single sign-on (SSO). In addition to my core expertise, I have a strong foundation in Active Directory, Servers, Cloud Computing, Network Administration, and Front-end Web Development. This diverse technical skill set enables me to effectively handle a wide range of challenges in a fast-paced IT environment.","sameAs":["https:\/\/www.ruianding.com"],"url":"https:\/\/www.ruianding.com\/blog\/author\/ruiand\/"}]}},"_links":{"self":[{"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/posts\/2644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/comments?post=2644"}],"version-history":[{"count":2,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/posts\/2644\/revisions"}],"predecessor-version":[{"id":2687,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/posts\/2644\/revisions\/2687"}],"wp:attachment":[{"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/media?parent=2644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/categories?post=2644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/tags?post=2644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}