Setting CloudPanel Custom Domain breaks Custom Domain #378

Closed
opened 2026-04-05 20:27:16 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @MildlyInterested on 7/6/2023

CloudPanel version(s) affected

2.3.1

Description

I noticed while accessing cloudpanel a warning about an outdated SSL certificicate. Seeing no obvious way to manually refresh that I naviated to Admin area --> Settings and clicked save on the Cloudpanel Custom Domain. The website immediately stopped responding, sites managed through cloudpanel continued to work fine. This was after updating from the previous version to 2.3.1 so it might have to do something with it.

How to reproduce

  1. Go to Admin Area --> Settings
  2. Under General click "Save" on your already existing custom domain.
  3. Website stops responding

Possible Solution

No response

Additional Context

Looking at /etc/nginx/sites-enabled/ it seems like as soon as I click save the custom-domain.conf and custom-domain.crt, custom-domain.key in /etc/nginx/ssl-certificates/ get deleted but not recreated. Copying it back in does not fix the issue because nginx won't load with that config since the config expects a SSL cert to be existing which at that point they don't.... Manually creating SSL certs, copying back the config and reloading NGINX fixes the issue. Although I'm not sure if the SSL certs will get refreshed by cloudpanel.

*Originally created by @MildlyInterested on 7/6/2023* ### CloudPanel version(s) affected 2.3.1 ### Description I noticed while accessing cloudpanel a warning about an outdated SSL certificicate. Seeing no obvious way to manually refresh that I naviated to Admin area --> Settings and clicked save on the `Cloudpanel Custom Domain`. The website immediately stopped responding, sites managed through cloudpanel continued to work fine. This was after updating from the previous version to 2.3.1 so it might have to do something with it. ### How to reproduce 1. Go to Admin Area --> Settings 2. Under General click "Save" on your already existing custom domain. 3. Website stops responding ### Possible Solution _No response_ ### Additional Context Looking at `/etc/nginx/sites-enabled/` it seems like as soon as I click save the `custom-domain.conf` and `custom-domain.crt`, `custom-domain.key` in `/etc/nginx/ssl-certificates/` get deleted but not recreated. Copying it back in does not fix the issue because nginx won't load with that config since the config expects a SSL cert to be existing which at that point they don't.... Manually creating SSL certs, copying back the config and reloading NGINX fixes the issue. Although I'm not sure if the SSL certs will get refreshed by cloudpanel.
Sign in to join this conversation.