Hi, this is my vhost configuration that has been working for several months.
However, an update to 1.6.11 results in the rewrite rules not being applied and all requests -- except for files in document root and sub directories -- throwing a 404 error. Had to downgrade to 1.6.10 to fix it.
Strace on openlitespeed reveals that the rewriterules are not being applied and that the server is not looking for relevant cache files or redirecting the request to the upstream proxy. No other change has been made on the server.
In other words, I can have a perfectly working 1.6.10 server, do an apt upgrade now, and get 404 errors on my website after a restart of OLS.
I get it back in working condition if I overwrite the /usr/local/lsws directory with the backup (1.6.10)
However, an update to 1.6.11 results in the rewrite rules not being applied and all requests -- except for files in document root and sub directories -- throwing a 404 error. Had to downgrade to 1.6.10 to fix it.
Strace on openlitespeed reveals that the rewriterules are not being applied and that the server is not looking for relevant cache files or redirecting the request to the upstream proxy. No other change has been made on the server.
In other words, I can have a perfectly working 1.6.10 server, do an apt upgrade now, and get 404 errors on my website after a restart of OLS.
I get it back in working condition if I overwrite the /usr/local/lsws directory with the backup (1.6.10)
Code:
docRoot /var/www/wordpress/
errorlog $VH_ROOT/logs/error.log {
useServer 1
logLevel DEBUG
rollingSize 10M
}
accesslog $VH_ROOT/logs/access.log {
logFormat %t %l%u %>s _%b_ -%{Content-Encoding}o- %D \"%r\" %h
useServer 0
rollingSize 10M
keepDays 10
compressArchive 1
}
index {
useServer 0
indexFiles index.php index.html
}
context /phpmyadmin/ {
location /var/www/phpmyadmin
allowBrowse 1
indexFiles index.php
accessControl {
allow *
}
addDefaultCharset off
phpIniOverride {
}
}
rewrite {
enable 1
autoLoadHtaccess 0
rules <<<END_rules
RewriteEngine on
RewriteCond %{QUERY_STRING} ^$
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/domainname/%{REQUEST_URI}/index-https.html -s
RewriteRule . /wp-content/cache/supercache/domainname/%{REQUEST_URI}/index-https.html [L]
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI} -s
RewriteRule . %{REQUEST_URI} [L]
RewriteRule ^/(.*)$ http://upstream-proxy/$1 [P,E=proxy-host:domainname]
END_rules
}
module cache {
# 1
checkPrivateCache 0
checkPublicCache 1
maxCacheObjSize 200000
maxStaleAge 300
qsCache 0
reqCookieCache 0
respCookieCache 0
ignoreReqCacheCtrl 1
ignoreRespCacheCtrl 0
enableCache 1
expireInSeconds 86000
enablePrivateCache 0
privateExpireInSeconds 3600
ls_enabled 1
}
Last edited: