Missing www/non-www domain #233

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

Originally created by @dcswalle on 5/29/2024

CloudPanel version(s) affected

2.4.2

Description

In old versions of CloudPanel if you add a new domain (eg: website.tld), in NginX www.website.tld is automatically added.
For latest version I found that this is not working anymore.
Old way of working for nginx domain default configuration:

server {
  listen 80;
  listen [::]:80;
  listen 443 ssl http2;
  listen [::]:443 ssl http2;
  {{ssl_certificate_key}}
  {{ssl_certificate}}
  server_name www.domainname.tld;
  return 301 https://domainname.tld$request_uri/;
}

server {
  listen 80;
  listen [::]:80;
  listen 443 ssl http2;
  listen [::]:443 ssl http2;
  {{ssl_certificate_key}}
  {{ssl_certificate}}
  server_name domainname.tld www1.domainname.tld;

2.4.2 nginx domain default configuration

server {
  listen 80;
  listen [::]:80;
  listen 443 quic;
  listen 443 ssl;
  listen [::]:443 quic;
  listen [::]:443 ssl;
  http2 on;
  http3 off;
  {{ssl_certificate_key}}
  {{ssl_certificate}}
  server_name domainname.tld;

How to reproduce

Create a new website and check vHosts.

Possible Solution

No response

Additional Context

No response

*Originally created by @dcswalle on 5/29/2024* ### CloudPanel version(s) affected 2.4.2 ### Description In old versions of CloudPanel if you add a new domain (eg: website.tld), in NginX www.website.tld is automatically added. For latest version I found that this is not working anymore. Old way of working for nginx domain default configuration: ``` server { listen 80; listen [::]:80; listen 443 ssl http2; listen [::]:443 ssl http2; {{ssl_certificate_key}} {{ssl_certificate}} server_name www.domainname.tld; return 301 https://domainname.tld$request_uri/; } server { listen 80; listen [::]:80; listen 443 ssl http2; listen [::]:443 ssl http2; {{ssl_certificate_key}} {{ssl_certificate}} server_name domainname.tld www1.domainname.tld; ``` 2.4.2 nginx domain default configuration ``` server { listen 80; listen [::]:80; listen 443 quic; listen 443 ssl; listen [::]:443 quic; listen [::]:443 ssl; http2 on; http3 off; {{ssl_certificate_key}} {{ssl_certificate}} server_name domainname.tld; ``` ### How to reproduce Create a new website and check vHosts. ### Possible Solution _No response_ ### Additional Context _No response_
MrUnknownDE added the feedback neededfeedback needed labels 2026-04-05 20:26:04 +02:00
Sign in to join this conversation.