Current File : //etc/sentora/configs/apache/httpd.conf_bk7 |
# Sentora Apache #Include file
# Written by Bobby Allen, 15/05/2011
# Set the Sentora Alias (used for development, sable will eventually use a VHOST)
#Alias /Sentora /etc/sentora/panel
# Set a default server name for the master configuration to supress Apache daemon warnings
ServerName localhost
# Setup the directory settings and PHP security flags for the Sentora application directory.
<Directory /etc/sentora/panel>
Options +FollowSymLinks
DirectoryIndex index.php
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_admin_value upload_tmp_dir /var/sentora/temp
</IfModule>
</Directory>
# Disallow web access to directories that don't need it/that we don't want people looking in!
<Directory /etc/sentora/panel/cnf/>
Require all denied
</Directory>
<Directory /etc/sentora/panel/modules/*/hooks>
Require all denied
</Directory>
# Set server tokens
ServerTokens Prod
# Now we include the generic VHOST configuration file that holds all Sentora user hosted vhost data
#Include /etc/sentora/configs/apache/httpd-vhosts.conf
###!!!LogFormat "%V %p %a %l %u %t \"%r\" %s %b \"%200{Referer}i\" \"%200{User-agent}i\" \"%{cookie}n\"" awklogpipe
###!!!CustomLog "|/usr/local/bin/apacheawklogpipe" awklogpipe env=!dontlog
IncludeOptional /etc/sentora/configs/apache/port/*.conf
IncludeOptional /etc/sentora/configs/apache/sentora/*.conf
IncludeOptional /etc/sentora/configs/apache/domains/*.conf
IncludeOptional /etc/sentora/configs/apache/phpconfig/*.conf
<IfModule mod_security2.c>
SecDataDir /tmp
SecAction phase:1,nolog,pass,initcol:ip=%{REMOTE_ADDR},initcol:user=%{REMOTE_ADDR},id:5000134
<Locationmatch "/wp-login.php">
SecRule user:bf_block "@gt 0" "deny,status:401,log,id:5000135,msg:'ip address blocked for 5 minutes, more than 10 login attempts in 3 minutes.'"
SecRule RESPONSE_STATUS "^302" "phase:5,t:none,nolog,pass,setvar:ip.bf_counter=0,id:5000136"
SecRule RESPONSE_STATUS "^200" "phase:5,chain,t:none,nolog,pass,setvar:ip.bf_counter=+1,deprecatevar:ip.bf_counter=1/180,id:5000137"
SecRule ip:bf_counter "@gt 5" "t:none,setvar:user.bf_block=1,expirevar:user.bf_block=1200,setvar:ip.bf_counter=0"
</locationmatch>
SecDataDir /tmp
SecAction phase:1,nolog,pass,initcol:ip=%{REMOTE_ADDR},initcol:user=%{REMOTE_ADDR},id:5000402
<Locationmatch "/xmlrpc.php">
SecRule user:bf_block "@gt 0" "deny,status:401,log,id:5000403,msg:'ip address blocked for 5 minutes, more than 10 login attempts in 3 minutes.'"
SecRule RESPONSE_STATUS "^302" "phase:5,t:none,nolog,pass,setvar:ip.bf_counter=0,id:5000404"
SecRule RESPONSE_STATUS "^200" "phase:5,chain,t:none,nolog,pass,setvar:ip.bf_counter=+1,deprecatevar:ip.bf_counter=1/180,id:5000405"
SecRule ip:bf_counter "@gt 1" "t:none,setvar:user.bf_block=1,expirevar:user.bf_block=1200,setvar:ip.bf_counter=0"
</locationmatch>
</IfModule>
<FilesMatch "/*.php">
SecRuleRemoveById 932105
SecRuleRemoveById 941160
SecRuleRemoveById 949110
SecRuleRemoveById 980130
SecRuleRemoveById 949110
SecRuleRemoveById 941350
SecRuleRemoveById 941200
SecRuleRemoveById 200002
SecRuleRemoveById 920130
</FilesMatch>
<FilesMatch "/">
SecRuleRemoveById 932105
SecRuleRemoveById 941160
SecRuleRemoveById 949110
SecRuleRemoveById 980130
SecRuleRemoveById 949110
SecRuleRemoveById 941350
SecRuleRemoveById 941200
SecRuleRemoveById 200002
SecRuleRemoveById 920130
</FilesMatch>
<IfModule mod_ssl.c>
NameVirtualHost *:443
</IfModule>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/opentype
# For Olders Browsers Which Can’t Handle Compression
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>