mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-16 12:57:32 -04:00
Update .htaccess to support Apache 2.2. and 2.4 (#957)
This commit is contained in:
73
.htaccess
73
.htaccess
@@ -5,29 +5,56 @@ Options +ExecCGI +Includes +IncludesNOEXEC +SymLinksIfOwnerMatch -Indexes
|
||||
# prevent folder listing
|
||||
IndexIgnore *
|
||||
|
||||
# secure htaccess file
|
||||
<Files .htaccess>
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
</Files>
|
||||
# Apache 2.4
|
||||
<IfModule authz_core_module>
|
||||
# secure htaccess file
|
||||
<Files .htaccess>
|
||||
Require all denied
|
||||
</Files>
|
||||
|
||||
# prevent access to PHP error log
|
||||
<Files error_log>
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
Satisfy all
|
||||
</Files>
|
||||
# prevent access to PHP error log
|
||||
<Files error_log>
|
||||
Require all denied
|
||||
</Files>
|
||||
|
||||
# prevent access to LICENSE
|
||||
<Files LICENSE>
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
Satisfy all
|
||||
</Files>
|
||||
# prevent access to LICENSE
|
||||
<Files LICENSE>
|
||||
Require all denied
|
||||
</Files>
|
||||
|
||||
# prevent access to csv and txt files
|
||||
<FilesMatch "\.(csv|txt)$">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
Satisfy all
|
||||
</FilesMatch>
|
||||
# prevent access to csv, txt and md files
|
||||
<FilesMatch "\.(csv|txt|md|yml|json|lock)$">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
|
||||
# Apache 2.2
|
||||
<IfModule !authz_core_module>
|
||||
# secure htaccess file
|
||||
<Files .htaccess>
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
Satisfy all
|
||||
</Files>
|
||||
|
||||
# prevent access to PHP error log
|
||||
<Files error_log>
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
Satisfy all
|
||||
</Files>
|
||||
|
||||
# prevent access to LICENSE
|
||||
<Files LICENSE>
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
Satisfy all
|
||||
</Files>
|
||||
|
||||
# prevent access to csv, txt and md files
|
||||
<FilesMatch "\.(csv|txt|md|yml|json|lock)$">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
Satisfy all
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
|
||||
@@ -8,7 +8,7 @@ function db_log_queries()
|
||||
if($CI->config->item('db_log_enabled'))
|
||||
{
|
||||
// Creating Query Log file with today's date in application/logs folder
|
||||
$filepath = APPPATH . 'logs/Query-log-' . date('Y-m-d') . '.log';
|
||||
$filepath = APPPATH . 'logs/Query-log-' . date('Y-m-d') . '.php';
|
||||
// Opening file with pointer at the end of the file
|
||||
$handle = fopen($filepath, "a+");
|
||||
|
||||
|
||||
@@ -24,11 +24,36 @@ RewriteRule ^(.*)$ index.php?/$1 [L]
|
||||
#Options All -Indexes
|
||||
Options +ExecCGI +Includes +IncludesNOEXEC +SymLinksIfOwnerMatch -Indexes
|
||||
|
||||
# secure htaccess file
|
||||
<Files .htaccess>
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
</Files>
|
||||
# prevent folder listing
|
||||
IndexIgnore *
|
||||
|
||||
# Apache 2.4
|
||||
<IfModule authz_core_module>
|
||||
# secure htaccess file
|
||||
<Files .htaccess>
|
||||
Require all denied
|
||||
</Files>
|
||||
# prevent access to PHP error log
|
||||
<Files error_log>
|
||||
Require all denied
|
||||
</Files>
|
||||
</IfModule>
|
||||
|
||||
# Apache 2.2
|
||||
<IfModule !authz_core_module>
|
||||
# secure htaccess file
|
||||
<Files .htaccess>
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
Satisfy all
|
||||
</Files>
|
||||
# prevent access to PHP error log
|
||||
<Files error_log>
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
Satisfy all
|
||||
</Files>
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_expires.c>
|
||||
<FilesMatch "\.(jpe?g|png|gif|js|css)$">
|
||||
|
||||
Reference in New Issue
Block a user