Cyperpanel with Client access

I am looking at selling some web hosting space to my friends and family. I need them to able able to access www.panel.domain.com for cyberpanel login. How do i enable a host name for cyperpanel and remove port 8090 from domain? i have tired to follow some guides here but cannot get it to work without putting 8090 at the end of my domain. I want my main domain to be the hosting site for selling the service and panel.domain to be the reseller / client access, like you would buy webhosting online and have access to cPanel. Please help and thanks

i think remove port not recommended

and even cpanel use port

you can set simple index.php header

https://panel.domain.tld/index.php
https://domain.tld/panel
fwd to domain.tld:8090

**you can use htaccess
but i recommended using php script

I will give it a try thanks. I will post an update tonight.

If it didn’t work for you, please note that the rewrite rule is to be exactly like this, not to adapt to your URL:

REWRITERULE ^(.*)$ HTTP://cyberpanel/$1 [P]

I will test again tonight with a new installation , thank you

If it doesn’t work still, write here and we guide you

Thank you, I can get it to work with the port on the end. Even tested it with port 8443

When you set up it again send me a message and I check it by anydesk

thank you everyone for your help. I have my domain:8443 and i am fine with the port at the end.

If you wish to remove port in the future make sure that on this file:

/usr/local/lsws/conf/httpd_config.conf

You have this:

extprocessor cyberpanel {
  type                    proxy
  address                 https://your.url.tld:8443
  maxConns                100
  pcKeepAliveTimeout      60
  initTimeout             60
  retryTimeout            0
  respBuffer              0
}

I do have that., not working. It points to my gateway without the port number. I don’t know if its a port forward or dns issue. If i can’t figure it out, i may just live with the issue.

I see, you also have the rewrite rule at the subdomain?
Can you show how it is?

I created one website panel.domain.com. Port is incorrect in image but i changed it and still the same.

1

Yes it’s how it should be then.
Have you restarted lsws and lscpd after the changes?

It shouldn’t affect, but may you also try with only the last line of rewrite rules, just to exclude any weird behavior? Restarting lsws and lscpd after

I will try that, I think it might be a port forwarding issue. I have restarted the server several times. Thank you for your help.

When you said you couldn’t put it to work, what happened?
Connection time out, error 503 or such?

Port yes, you need to add that port to the firewall to open it, although if you used the change port inside cyberpanel it should had done that automatically

Tested your rewrite rules.
That redirect to https is messing it.

Change them into this:

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.) https://%{SERVER_NAME}/$1 [R,L]
RewriteRule ^(.*)$ HTTP://cyberpanel/$1 [P]

And then:
systemctl restart lsws

1 Like

IT WORKED!!! Thank you so much.

Well now it’s using port 443, I already have a nextcloud server running on that port. Im looking in to proxypass if that will work.