global include configuration

#1
I am a user of WHM, recently installed and still testing cyberpanel where openlitspeed is installed as web server.
in cPanel/WHM where apache is installed as web server, have available option to add "Pre Main Include", "Pre VirtualHost Include" and "Post VirtualHost Include" fields to insert anything one wants to include above or below apache main configuration as custom configuration which never changed even apache updated.

i tried to figure out the same in OLS installed in cyberpanel but did not know how to achieve that goal as i want to add "Post VirtualHost Include" and "Post VirtualHost Include" by means of which such functions will be added on each virtual host, already created and also those which will be created later.

I have cyberpanel installed on CentOS 7
main OLS config file path is /usr/local/lsws/conf/httpd_config.conf

Need to know how step by step, one can achieve above mentioned goal.
 

Cold-Egg

Administrator
#2
Have you tried include method inside of the /usr/local/lsws/conf/httpd_config.conf, e.g.
Code:
include /usr/local/lsws/conf/*.conf
 
#3
I understand that but what will happen when OLS will update, this file will update too and made changes would be lost?

Also i want to know below, in my cpanel server i have below code in custom file pre_virtualhost_global.conf


<IfModule mod_fcgid.c>
FcgidMaxRequestLen 1073741824
</IfModule>

<Directory "/home">
Options +ExecCGI -FollowSymLinks +Includes +IncludesNOEXEC -Indexes -MultiViews +SymLinksIfOwnerMatch
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>



Let suppose i create a new custom file in OLS, include it in main OLS conf file then how the same code i can write in that custom file because above given code is for apache.

Any help would be appreciated.
 

Cold-Egg

Administrator
#4
I understand that but what will happen when OLS will update, this file will update too and made changes would be lost?
It shouldn't, you can give it a try

For those settings,
Please check Request/Response from the Web Admin > Server Configuration > Tuning
Please check Index Files section from the Web Admin > Server Configuration > General
 
#5
I created separate custom conf file and included it in main /usr/local/lsws/conf/httpd_config.conf

Yet confused how to insert rules i wrote for an apache include file because settings available on below path are not the one i am looking for

Please check Request/Response from the Web Admin > Server Configuration > Tuning
Please check Index Files section from the Web Admin > Server Configuration > General

I am not much expert in al this stuff
still looking for how i can add below code in an include file for OLS

<IfModule mod_reqtimeout.c>
RequestReadTimeout header=20,MinRate=500 body=20,MinRate=500
</IfModule>

<IfModule mod_fcgid.c>
FcgidMaxRequestLen 1073741824
</IfModule>
<Directory "/home">
Options +ExecCGI -FollowSymLinks +Includes +IncludesNOEXEC -Indexes -MultiViews +SymLinksIfOwnerMatch
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>

<FilesMatch "^(xmlrpc\.php)">
Order Deny,Allow
# Whitelist Jetpack/ Automattic CIDR IP Address Blocks
Allow from 192.0.64.0/18
Allow from 209.15.0.0/16
Allow from 66.155.0.0/17
Deny from all
</FilesMatch>
 

Pong

Administrator
#6
No exact match. For OLS configuration, you will need to login to OLS web admin to configure there. it may not have eact match.

Allow deny, you can create rewrite rules to do so.
 
Top