{"id":3819,"date":"2019-03-19T09:16:10","date_gmt":"2019-03-19T03:46:10","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=3819"},"modified":"2026-10-11T12:54:57","modified_gmt":"2026-10-11T07:24:57","slug":"centos-web-panel-isnt-accessible-reinstall-self-signed-ssl-certificate","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/centos-web-panel-isnt-accessible-reinstall-self-signed-ssl-certificate\/","title":{"rendered":"CentOS Web Panel isn&#8217;t accessible &#8211; Reinstall Self Signed SSL Certificate"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Post Date: March 19, 2019 <br>Last Updated: October 11, 2026<\/h3>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This guide explains how to fix Control Web Panel (formerly CentOS Web Panel, or CWP) when the admin panel on port 2031 won&#8217;t load because its self signed SSL certificate file is missing. The service can look healthy while the panel is unreachable, so the cause is easy to miss.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Two quick checks usually come first: whether the service is running, and whether the port is blocked by the firewall. In this case neither is the real problem. The logs show the actual cause, a missing self signed SSL certificate file.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> The product is now called <strong>Control Web Panel<\/strong> and lives at <a href=\"https:\/\/control-webpanel.com\/\" target=\"_blank\" rel=\"noopener\">control-webpanel.com<\/a>. The service name (<code>cwpsrv<\/code>) and the admin port (2031) are unchanged. CentOS 7 is past end-of-life, but these steps work the same on AlmaLinux and Rocky Linux.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before you replace the self signed SSL certificate, make sure you have:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Root or sudo access to the server over SSH<\/li>\n\n\n\n<li>A server running Control Web Panel<\/li>\n\n\n\n<li>Port 2031 allowed in your firewall<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Architecture<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>cwpsrv<\/code> is the panel&#8217;s own web server. It listens on port 2031 and reads a self signed SSL certificate and private key from <code>\/etc\/pki\/tls\/<\/code> when it starts<\/li>\n\n\n\n<li>If it can&#8217;t open the certificate file, it logs an error and can&#8217;t serve HTTPS, even though the service itself may still show as running<\/li>\n\n\n\n<li>Firewall and service checks both pass, so the problem looks mysterious until you read the logs<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The diagram below shows why a missing self signed SSL certificate takes the panel offline:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/03\/CWP-SSL-Certificate-Loading-Error.png\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/03\/CWP-SSL-Certificate-Loading-Error-1024x683.png\" alt=\"\" class=\"wp-image-12231\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/03\/CWP-SSL-Certificate-Loading-Error-1024x683.png 1024w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/03\/CWP-SSL-Certificate-Loading-Error-300x200.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/03\/CWP-SSL-Certificate-Loading-Error-768x512.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/03\/CWP-SSL-Certificate-Loading-Error-272x182.png 272w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/03\/CWP-SSL-Certificate-Loading-Error.png 1536w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">For general OpenSSL options, see the <a href=\"https:\/\/www.openssl.org\/docs\/\" target=\"_blank\" rel=\"noopener\">OpenSSL documentation<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Steps to Generate a New Self Signed SSL Certificate for CWP<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Confirm the Cause in the Logs<\/h3>\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 journalctl -u cwpsrv --no-pager | tail -n 20\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You&#8217;re looking for an error like this:<\/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=\"\">cwpsrv: [emerg] IO_new_file(\"\/etc\/pki\/tls\/certs\/hostname.crt\") failed (SSL: error:02001002:system library:fopen:No such file or directory ...)\n<\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Correction to the original diagnosis:<\/strong> The original guide said the problem was an <em>expired<\/em> self signed SSL certificate. An expired certificate only causes a browser warning, not this error. &#8220;No such file or directory&#8221; means the file is <strong>missing<\/strong>, or it&#8217;s a symlink pointing at a file that no longer exists. Step 2 tells you which.<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">2. Check the Certificate Files<\/h3>\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=\"\">ls -l \/etc\/pki\/tls\/certs\/hostname.crt \/etc\/pki\/tls\/private\/hostname.key\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If either file is missing, or shows as a symlink to a target that doesn&#8217;t exist, you need to create a new pair.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Back Up Anything That Exists<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If either file is present, copy it aside before overwriting:<\/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 mkdir -p \/root\/cwp-ssl-backup\nsudo cp -a \/etc\/pki\/tls\/certs\/hostname.crt \/etc\/pki\/tls\/private\/hostname.key \/root\/cwp-ssl-backup\/ 2>\/dev\/null\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">It&#8217;s fine if <code>cp<\/code> reports that a file doesn&#8217;t exist.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4. Generate the New Certificate and Key<\/h3>\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 openssl req -x509 -nodes -days 365 -newkey rsa:2048 \\\n  -keyout \/etc\/pki\/tls\/private\/hostname.key \\\n  -out \/etc\/pki\/tls\/certs\/hostname.crt \\\n  -subj \"\/CN=$(hostname -f)\"\n<\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Notes:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-subj<\/code> fills in the certificate&#8217;s name automatically, so the command doesn&#8217;t stop to ask interactive questions. Make sure <code>hostname -f<\/code> prints your server&#8217;s real hostname.<\/li>\n\n\n\n<li>A self signed SSL certificate generated with <code>-days 365<\/code> will expire in a year. That&#8217;s harmless for the panel to start, but browsers will keep warning. Raise the number for fewer renewals, or install a trusted certificate to remove the warning entirely.<\/li>\n\n\n\n<li>This replaces the old key as well as the certificate, so the two always match.<\/li>\n<\/ul>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">5. Set the Correct Permissions<\/h3>\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 chmod 600 \/etc\/pki\/tls\/private\/hostname.key\nsudo chmod 644 \/etc\/pki\/tls\/certs\/hostname.crt\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The private key should be readable by root only.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">6. Restart CWP and Verify<\/h3>\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 systemctl restart cwpsrv.service\nsudo systemctl status cwpsrv.service\nsudo ss -tlnp | grep 2031\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The last command confirms something is listening on port 2031. Then open the panel:<\/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=\"\">https:\/\/your-server-ip:2031\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Your browser will show a security warning, which is expected for a self signed SSL certificate. Accept it to continue. To confirm the new certificate&#8217;s dates:<\/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=\"\">openssl x509 -in \/etc\/pki\/tls\/certs\/hostname.crt -noout -dates\n<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/03\/Screen-Shot-2019-03-18-at-1.45.01-PM-1024x484-1.png\"><img decoding=\"async\" width=\"1024\" height=\"484\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/03\/Screen-Shot-2019-03-18-at-1.45.01-PM-1024x484-1.png\" alt=\"\" class=\"wp-image-12232\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/03\/Screen-Shot-2019-03-18-at-1.45.01-PM-1024x484-1.png 1024w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/03\/Screen-Shot-2019-03-18-at-1.45.01-PM-1024x484-1-300x142.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/03\/Screen-Shot-2019-03-18-at-1.45.01-PM-1024x484-1-768x363.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When the panel is unreachable but the service and firewall look fine, read the <code>cwpsrv<\/code> logs. If they show a missing <code>hostname.crt<\/code>, generating a fresh self signed SSL certificate and key, setting the right permissions, and restarting <code>cwpsrv<\/code> brings the panel back. The cause is a missing or broken file rather than an expired certificate, which is why checking the files in Step 2 matters.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently Asked Questions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Why is the panel unreachable when cwpsrv shows as running?<\/strong> The service can start but fail to open its SSL certificate, which logs an error and leaves the HTTPS listener unusable. Always read the logs, not just the service status.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Will the new self signed SSL certificate expire again?<\/strong> Yes, after the number of days you set with <code>-days<\/code>. Expiry itself won&#8217;t stop the panel from starting, but browsers will warn. Use a longer period, or install a certificate from a trusted authority.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Does the browser trust a self signed SSL certificate?<\/strong> No. You&#8217;ll see a warning on every new browser until you install a trusted certificate for the panel&#8217;s hostname. The connection is still encrypted.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Do other services use these same files?<\/strong> Possibly. If your mail or FTP services are configured to use the same certificate paths, restart them as well so they pick up the new files.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Related Articles<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/what-is-an-ssl-certificate-and-how-does-it-work\/\" target=\"_blank\" rel=\"noreferrer noopener\">SSL\/TLS Configuration and Verification on Linux<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/how-to-set-up-ssl-lets-encrypt-for-a-plesk-mail-server\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to set up SSL (Let\u2019s Encrypt) for a Plesk mail server<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Talk to Our Technology Experts<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Is your control panel down or showing SSL errors? Our team can help with control panel troubleshooting, SSL\/TLS configuration, and ongoing server support.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/contact\">Connect with our technology experts.<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Post Date: March 19, 2019 Last Updated: October 11, 2026 Introduction This guide explains how to fix Control Web Panel [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1024],"tags":[161,543,277,206],"class_list":["post-3819","post","type-post","status-publish","format-standard","hentry","category-security","tag-centos","tag-centos-webpanel","tag-ssl","tag-ssl-certificate-installation","psol-cat-security"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-ZB","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/3819","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=3819"}],"version-history":[{"count":1,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/3819\/revisions"}],"predecessor-version":[{"id":12233,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/3819\/revisions\/12233"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=3819"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=3819"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=3819"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}