Recommend this page to a friend! |
Download .zip |
Info | Documentation | View files (3) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2022-01-07 (14 days ago) | Not yet rated by the users | Total: 35 This week: 2 | All time: 10,345 This week: 85 |
Version | License | PHP version | Categories | |||
policymaker 1.0.0 | GNU General Publi... | 5 | PHP 5, Systems administration, Config... |
Description | Author | ||||||||||||||
This package can generate Web server configuration from a policy. |
|
This package serves to create custom access policies for server software. Apache, Microsoft ISS, LiteSpeed and Nginx software are supported.
Out-of-class use:
code:
require_once('Mind.php');
$m = new Mind([
'policy'=>array(
'allow'=>'public' // or array
)
]);
$m::aliyilmaz('policyMaker')->policyMaker();
When using it in the class:
code:
self::$conf = [
'policy'=>array(
'allow'=>'public' // or array
)
];
self::aliyilmaz('policyMaker')->policyMaker();
Out-of-class use:
code:
require_once('Mind.php');
$m = new Mind();
$m::aliyilmaz('policyMaker')->policyMaker();
// $m::aliyilmaz('policyMaker')->setAllow('public')->policyMaker();
// $m::aliyilmaz('policyMaker')->setDeny('developer')->policyMaker();
// $m::aliyilmaz('policyMaker')->setDeny('developer')->setAllow('public')->policyMaker();
// $m::aliyilmaz('policyMaker')->setDeny(['developer', 'app'])->setAllow(['public', 'files'])->policyMaker();
When using it in the class:
code:
self::aliyilmaz('policyMaker')->policyMaker();
// self::aliyilmaz('policyMaker')->setAllow('public')->policyMaker();
// self::aliyilmaz('policyMaker')->setDeny('developer')->policyMaker();
// self::aliyilmaz('policyMaker')->setDeny('developer')->setAllow('public')->policyMaker();
// self::aliyilmaz('policyMaker')->setDeny(['developer', 'app'])->setAllow(['public', 'files'])->policyMaker();
output:
Server access files are created by server software type.
Blocking access to directories is always a priority.
Therefore, if a conflicting directory is detected in the directory definitions, access is denied.
Access to directories that are not specifically allowed is always blocked.
For Nginx:
The following steps should be applied only for Nginx, there is no need for intervention in other server software. Add the following rules to the server {}
container in the .conf file that affects the project and restart the server. You need to enter the directories whose access you will restrict in the parenthesis in the location ~ /(app)/
section with | separator such as (app|special)
.
error_page 404 /index.php;
location / {
try_files $uri $uri/ /index.php$is_args$args;
autoindex on;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass php_upstream;
}
location ~ /(app)/ {
deny all;
return 403;
}
Instructions and files in this directory are shared under the GPL3 license.
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.