My Solution is create domains
for admin
cwpadmin.mydomain.com
for user
cwpuser.mydomain.com
Then do the reverse proxy
[CWP] WebServers Settings >> WebServers Domain Conf >> Select User&Domain: cwpadmin.mydomain.com
>>
[Nginx >Proxy > custom port]
Custom port: 2031
IP: hostname.mydomain.com ##this is the host domain need to port number to visit the admin panel.
Not ready yet. we still need to change something in vhost for domain change proxy_pass url from http to https since we need to visit with SSL
[CWP] WebServers Settings >> WebServers Conf Edictor >>
/etc/nginx/conf.d/vhosts/cwpadmin.mydomain.com.conf
/etc/nginx/conf.d/vhosts/cwpadmin.mydomain.com.ssl.conf
why you guys always love the complicated ways ?
add subdomain: admin.mydomain.com
add subdomain: user.mydomain.com
add index.php
put header auto redirect 0 second or 1 second and put some "beauty of html5"
admin: forward to root cwp
user: forwart to user cwp
same methode can be applied to
mydomain.com/admin
mydomain.com/user
even cpanel use that .. and display the port... except you have 1 server for cwp only... you can modified the 80 443 to cwp port ... it will display no port