Add Custom Security Headers on OLS Servers in ORIV
Step 1: SSH Into Your Server
Before making any changes, you must SSH into your OLS server:Step 2: Use the vhconf.server.conf Config File
Use the following file to define your custom HTTP security headers:Step 3: Add Security Headers
To add custom security headers, update vhconf.server.conf with the following block:Step 4: Apply the Configuration
After updating the configuration, restart LiteSpeed to apply the changes: systemctl restart lsws && killall -9 lsphpAdd Custom Security Headers on NGINX Servers in ORIV
For NGINX-based ORIV servers, you can add custom security headers right from the ORIV Dashboard. Read this documentation for more information about custom NGINX: 👉How To Configure Custom NGINX In ORIV? 📌 Notes- Do not edit vhconf.conf directly – it’s automatically regenerated by the ORIV panel.
- Use vhconf.server.conf on OLS servers to retain customizations.
- Always restart LiteSpeed or NGINX after making changes for them to take effect.
