I have installed cyberpanel (open litespeed) on my Ubuntu server and listed a site there. I want to handle subdomains dynamically.
here is my vhost.conf
docRoot $VH_ROOT/public_html vhDomain
$VH_NAME vhAliases *.$VH_NAME, www.$VH_NAME adminEmails user@gmail.com enableGzip
1 enableIpGeo 1errorlog $VH_ROOT/logs/$VH_NAME.error_log { useServer
0 logLevel WARN rollingSize 10M }accesslog $VH_ROOT/logs/$VH_NAME.access_log { useServer
0 logFormat “%h %l %u %t “%r” %>s %b “%{Referer}i” “%{User-Agent}i”” logHeaders 5 rollingSize
10M keepDays 10 compressArchive 1 }index { useServer 0 indexFiles
index.php, index.html }scripthandler { add lsapi:aihow5388 php }
phpIniOverride { php_admin_value open_basedir “/tmp:$VH_ROOT” }
extprocessor aihow5388 { type lsapi address
UDS://tmp/lshttpd/aihow5388.sock maxConns 10 env
LSAPI_CHILDREN=10 initTimeout 600 retryTimeout
0 persistConn 1 pcKeepAliveTimeout 1 respBuffer 0 autoStart 1 path
/usr/local/lsws/lsphp82/bin/lsphp extUser aihow5388 extGroup aihow5388 memSoftLimit 2047M
memHardLimit 2047M procSoftLimit 400
procHardLimit 500 }context /.well-known/acme-challenge { location
/usr/local/lsws/Example/html/.well-known/acme-challenge allowBrowse 1rewrite { enable 0 } addDefaultCharset off }
rewrite { enable 1 autoLoadHtaccess 1 }
module cache { storagePath /usr/local/lsws/cachedata/$VH_NAME }
Moreover, I have created an A record pointing *.site.com to the IP address to handle subdomains.
But I am getting: 404 Not Found The resource requested could not be found on this server!
when I access subdomain like: sub.site.com
Note: my existing site works if I upgrade from Open LiteSpeed to LiteSpeed Enterprise.
How to fix this error?