Skip to main content

CyberPanel without port 8090 and with a hostname

HOW TO REMOVE PORT 8090 FROM CYBERPANEL


Many of the users have asked about removing port 8090 so that they can visit CyberPanel on a plain domain like panel.cyberpanel.net. However, normally this is not possible because port 8090 is hardcoded into to LSCPD server which powers CyberPanel. (Hardcoded configurations are used to improve performance)

Step 1: Create a Website for Hostname

First, you need to decide the domain on which you want to access CyberPanel without the port being appended to it. We are going to use https://switch.cyberpanel.net.
Now create a website for this domain (hostname). Please make sure that A record of this domain already points towards your server.

Step 2: Issue Hostname SSL

We now need to issue Hostname SSL for the domain we choose above. In our example it is https://switch.cyberpanel.net.

Setup CyberPanel without port 8090 (OpenLiteSpeed)

Steps above are common whether you run OpenLiteSpeed or LiteSpeed Enterprise Web server. But now you need to do thing differently. We will discuss OpenLiteSpeed first.
Open command line and edit: /usr/local/lsws/conf/httpd_config.conf
Paste following content:
Please replace https://switch.cyberpanel.net:8090 with the domain you choose in Step 1.
Use Rewrite Rules to Proxy to port 8090
You can now use rewrite rules to proxy traffic to port 8090,  now edit rewrite rules for the domain you choose in Step 1 using the rewrite rule guide. You can use these rules:
Once done, you can now visit CyberPanel on your domain without port 8090. You can also visit PHPMyAdmin and Rainloop.

Setup CyberPanel without port 8090 (LiteSpeed Enterprise Web server)

If you have installed CyberPanel Ent, you are using LiteSpeed Enterprise Web server. If you are not already on CyberPanel Ent and want to switch you can read the switch guide.
Open command line and edit: /usr/local/lsws/conf/httpd_config.xml
Paste following content:
Make sure to paste it inside <extProcessorList></extProcessorList> in the configuration file.
Use Rewrite Rules to Proxy to port 8090
You can now use rewrite rules to proxy traffic to port 8090,  now edit rewrite rules for the domain you choose in Step 1 using the rewrite rule guide. You can use these rules:
Once done, you can now visit CyberPanel on your domain without port 8090. You can also visit PHPMyAdmin and Rainloop.
Content saved FROM: 

Popular posts from this blog

Múltiplas contas de git via ssh como lidar com isso?

Eu estava tendo dificuldades para conciliar multiplas contas git com autenticação ssh no meu linux. A resolução para isso é simples, basta criar um arquivo config no diretório ~/.ssh/ No arquivo config você irá dizer que para cada host XYZ deve ser utilizado a chave de autenticação ABC. Mas se você possui duas chaves de autenticação no mesmo host? Ou seja, o motivo é você possuir duas contas no github ou bitbucket, então você vai setar o hostname original do github ou bitbucket no seu arquivo ~/.ssh/config e fazer hostnames personalizados localmente. Com o exemplo você vai entender melhor: Meu arquivo ~/.ssh/config: Host bitbucket.org-ovictoraurelio     HostName bitbucket.org     User git     IdentityFile ~/.ssh/id_bitbucket_ovictoraurelio     IdentitiesOnly yes Host bitbucket.org-outrovictor     HostName bitbucket.org     User git     IdentityFile ~/.ssh/id_bitbucket_outro...