Remove Port 8090 from URL

Note: If you're using Cloudflare for DNS management then you have to disable the proxied DNS record for the subdomain you want to use for Cyberpanel. Because Cloudflare blocks port 8090 (Reference)

  1. Add a new website using Cyberpanel that will have the domain/subdomain which will be used to go to the cyberpanel

  2. SSH into the VPS terminal and make sure you're the root user by using the sudo su command

  3. Go to the directory where httpd_config.conf file is

 cd /usr/local/lsws/conf
  1. Edit the httpd_config.conf file

nano httpd_config.conf
  1. Add the following code inside httpd_config.conf and make sure there's no duplicate

extprocessor cyberpanel {
  type                    proxy
  address                 https://c01.sikka.io:8090
  maxConns                100
  pcKeepAliveTimeout      60
  initTimeout             60
  retryTimeout            0
  respBuffer              0
}
  1. Go to the cyberpanel and edit the website you're using for cyberpanel

  2. Click on rewrite rules and add the following code:

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
RewriteRule ^(.*)$ http://cyberpanel/$1 [P]
  1. Restart OpenLiteSpeed to apply the changes using the following command

sudo /usr/local/lsws/bin/lswsctrl restart

Congratulations, Now you can access Cyberpanel using a normal domain name without appending the port number. For example https://c01.sikka.io

Last updated