105 lines
2.6 KiB
Plaintext
105 lines
2.6 KiB
Plaintext
|
|
# WordOps Admin Backend Virtual Host - WordOps {{release}}
|
||
|
|
# Port {{port}}
|
||
|
|
|
||
|
|
docRoot {{webroot}}22222/htdocs
|
||
|
|
vhDomain _backend
|
||
|
|
enableGzip 1
|
||
|
|
enableBr 1
|
||
|
|
|
||
|
|
errorlog {{webroot}}22222/logs/ols.error_log {
|
||
|
|
useServer 0
|
||
|
|
logLevel ERROR
|
||
|
|
rollingSize 10M
|
||
|
|
}
|
||
|
|
|
||
|
|
accesslog {{webroot}}22222/logs/ols.access_log {
|
||
|
|
useServer 0
|
||
|
|
rollingSize 10M
|
||
|
|
keepDays 30
|
||
|
|
compressArchive 0
|
||
|
|
}
|
||
|
|
|
||
|
|
index {
|
||
|
|
useServer 0
|
||
|
|
indexFiles index.php, index.html, index.htm
|
||
|
|
autoIndex 1
|
||
|
|
}
|
||
|
|
|
||
|
|
# PHP handler
|
||
|
|
scripthandler {
|
||
|
|
add lsapi:lsphp{{default_php_short}} php
|
||
|
|
}
|
||
|
|
|
||
|
|
extprocessor lsphp{{default_php_short}} {
|
||
|
|
type lsapi
|
||
|
|
address uds://tmp/lshttpd/lsphp{{default_php_short}}.sock
|
||
|
|
maxConns 10
|
||
|
|
env PHP_LSAPI_CHILDREN=10
|
||
|
|
env LSAPI_AVOID_FORK=200M
|
||
|
|
initTimeout 60
|
||
|
|
retryTimeout 0
|
||
|
|
pcKeepAliveTimeout 60
|
||
|
|
respBuffer 0
|
||
|
|
autoStart 2
|
||
|
|
path /usr/local/lsws/lsphp{{default_php_short}}/bin/lsphp
|
||
|
|
backlog 100
|
||
|
|
instances 1
|
||
|
|
priority 0
|
||
|
|
memSoftLimit 2047M
|
||
|
|
memHardLimit 2047M
|
||
|
|
procSoftLimit 1400
|
||
|
|
procHardLimit 1500
|
||
|
|
}
|
||
|
|
|
||
|
|
# Rewrite rules
|
||
|
|
rewrite {
|
||
|
|
enable 1
|
||
|
|
autoLoadHtaccess 1
|
||
|
|
rules <<<END_rules
|
||
|
|
RewriteRule ^(.*)$ /index.php?$1 [QSA,L]
|
||
|
|
END_rules
|
||
|
|
}
|
||
|
|
|
||
|
|
# HTTP Auth realm for backend
|
||
|
|
realm WordOpsBackend {
|
||
|
|
userDB {
|
||
|
|
location /usr/local/lsws/conf/htpasswd-wo
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
# Require auth for the whole backend
|
||
|
|
context / {
|
||
|
|
realm WordOpsBackend
|
||
|
|
authName "Restricted Area"
|
||
|
|
required valid-user
|
||
|
|
allowBrowse 1
|
||
|
|
addDefaultCharset off
|
||
|
|
}
|
||
|
|
|
||
|
|
# Netdata proxy context
|
||
|
|
context /netdata/ {
|
||
|
|
type proxy
|
||
|
|
handler netdata_backend
|
||
|
|
addDefaultCharset off
|
||
|
|
}
|
||
|
|
|
||
|
|
extprocessor netdata_backend {
|
||
|
|
type proxy
|
||
|
|
address 127.0.0.1:19999
|
||
|
|
maxConns 100
|
||
|
|
pcKeepAliveTimeout 60
|
||
|
|
initTimeout 60
|
||
|
|
retryTimeout 0
|
||
|
|
respBuffer 0
|
||
|
|
}
|
||
|
|
|
||
|
|
# SSL Configuration
|
||
|
|
vhssl {
|
||
|
|
keyFile /var/www/22222/cert/22222.key
|
||
|
|
certFile /var/www/22222/cert/22222.crt
|
||
|
|
sslProtocol 24
|
||
|
|
}
|
||
|
|
|
||
|
|
# Include custom configs
|
||
|
|
include {{webroot}}22222/conf/ols/*.conf
|