fix: admpass.sh hang, OLS httpd_config structure, listener maps
Three fixes:
1. Replace admpass.sh calls with direct htpasswd writes — the script
is interactive-only (no --password flag) and hangs forever in
automation. Write admin htpasswd directly with openssl passwd.
2. Fix httpd_config.conf template — OLS requires virtualHost {} blocks
with vhRoot/configFile, not bare include of vhconf.conf files.
Add proper _backend virtualHost block, map it to Backend listener,
use self-signed cert for Secure listener until real certs exist.
3. Fix addOLSListenerMap to only add maps to Default and Secure
listeners (not Backend which is reserved for the admin panel).
4. Fix default PHP detection to read from wo.conf config instead
of picking first installed version (which would prefer php74).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -176,6 +176,18 @@ module cache {
|
||||
privateExpireInSeconds 3600
|
||||
}
|
||||
|
||||
# Include LSPHP external app definitions
|
||||
include /usr/local/lsws/conf/lsphp*.conf
|
||||
|
||||
# Backend virtual host (port 22222 admin panel)
|
||||
virtualHost _backend {
|
||||
vhRoot /var/www/22222/
|
||||
configFile /usr/local/lsws/conf/vhosts/_backend/vhconf.conf
|
||||
allowSymbolLink 1
|
||||
enableScript 1
|
||||
restrained 0
|
||||
}
|
||||
|
||||
# Listener for HTTP on port 80
|
||||
listener Default {
|
||||
address *:80
|
||||
@@ -186,8 +198,8 @@ listener Default {
|
||||
listener Secure {
|
||||
address *:443
|
||||
secure 1
|
||||
keyFile /usr/local/lsws/conf/example.key
|
||||
certFile /usr/local/lsws/conf/example.crt
|
||||
keyFile /var/www/22222/cert/22222.key
|
||||
certFile /var/www/22222/cert/22222.crt
|
||||
sslProtocol 24
|
||||
enableQuic 1
|
||||
}
|
||||
@@ -199,10 +211,7 @@ listener Backend {
|
||||
keyFile /var/www/22222/cert/22222.key
|
||||
certFile /var/www/22222/cert/22222.crt
|
||||
sslProtocol 24
|
||||
map _backend *
|
||||
}
|
||||
|
||||
# Include external app definitions
|
||||
include /usr/local/lsws/conf/lsphp*.conf
|
||||
|
||||
# Include virtual host mappings
|
||||
include /usr/local/lsws/conf/vhosts/*/vhconf.conf
|
||||
# WordOps managed vhost mappings below (do not edit this line)
|
||||
|
||||
Reference in New Issue
Block a user