Hello, I would like to come to your help again. Since I usually get very accurate answers that help me to advance a lot and learn more about servers and the use of cyberpanel.
My forte is programming but currently in my job I have to deploy and work as devOps
I am deploying some angular ssr on my server with cyberpanel. For this I use pm2 and using vhost config
this way:
docRoot /home/miweb.com/hotel
vhDomain $VH_NAME
vhAliases www.$VH_NAME
adminEmails [email protected]
enableGzip 1
enableIpGeo 1
index {
useServer 0
indexFiles index.php, index.html
}
errorlog $VH_ROOT/logs/miweb.com.error_log {
useServer 0
logLevel WARN
rollingSize 10M
}
accesslog $VH_ROOT/logs/miweb.com.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
}
errorpage 403 {
url 403.html
}
errorpage 404 {
url 404.html
}
errorpage 500 {
url 500.html
}
scripthandler {
add proxy:miweb123 html
}
extprocessor miweb123 {
type proxy
address 127.0.0.1:4018
maxConns 2000
initTimeout 20
retryTimeout 0
respBuffer 0
}
module cache {
storagePath $VH_ROOT/lscache
}
rewrite {
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
RewriteRule /(.*) ws://127.0.0.1:4018/$1 [P]
enable 1
autoLoadHtaccess 1
}
context /.well-known/acme-challenge {
location /home/miweb.com/public_html/.well-known/acme-challenge
}
context / {
type proxy
handler miweb123
addDefaultCharset off
}
vhssl {
keyFile /etc/letsencrypt/live/hotel.miweb.com/privkey.pem
certFile /etc/letsencrypt/live/hotel.miweb.com/fullchain.pem
certChain 1
sslProtocol 24
enableECDHE 1
renegProtection 1
sslSessionCache 1
enableSpdy 15
enableStapling 1
ocspRespMaxAge 86400
}
But this puts a huge load on my server on its ram and cpu.
Is there an alternative to avoid this problem?
Maybe an alternative to pm2 using litespeed’s internal proxy?
I really appreciate any help you can give me.