Currently OpenLiteSpeed reads .htaccess on startup, so if some new .htaccess files are created, or existing ones are modified, the changes will not take effect until the OpenLiteSpeed service is reloaded
aaP_wendellalves23
Hello, It is recommended that you check whether the file has been modified every 5 minutes through the cron shell script, and restart the service automatically if it is modified.
#!/bin/bash
# Set the file path to monitor
watch_file="/www/wwwroot/*/.htaccess"
# will check if the specified file has been modified within the last 5 minutes
if [ $(find $watch_file -mmin -5) ]
then
echo "File has changed, executing command..."
# restart ols
/usr/local/lsws/bin/lswsctrl restart
fi