Compare commits
393 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9aee86f2bf | ||
![]() |
453a8f9167 | ||
![]() |
66a9f62eda | ||
![]() |
b20b4996f0 | ||
![]() |
56c5fdab11 | ||
![]() |
cba950c39c | ||
![]() |
cce0c89ebd | ||
![]() |
d38ac0c957 | ||
![]() |
9ab835fdfd | ||
![]() |
26508518fc | ||
![]() |
fd72dab6b0 | ||
![]() |
099a00236a | ||
![]() |
014d5c2391 | ||
![]() |
cb0a947e4c | ||
![]() |
f715b7e53d | ||
![]() |
10b909024d | ||
![]() |
2fa704e1f7 | ||
![]() |
0c256a036a | ||
![]() |
f0f7475dc3 | ||
![]() |
372edce6ca | ||
![]() |
72dfd235ae | ||
![]() |
b20745dfd4 | ||
![]() |
5cb246442f | ||
![]() |
9bf70dcd58 | ||
![]() |
d23172ab41 | ||
![]() |
5cd25df190 | ||
![]() |
2c14ac8062 | ||
![]() |
a49781bb17 | ||
![]() |
743cc2e13a | ||
![]() |
2f2567645a | ||
![]() |
2a9676d8ba | ||
![]() |
47939b670f | ||
![]() |
1cefb7c00b | ||
![]() |
fb4acf472b | ||
![]() |
2d8fe68344 | ||
![]() |
9b0f0260d7 | ||
![]() |
0a0f7ea77f | ||
![]() |
8edf174554 | ||
![]() |
ac73a36a1f | ||
![]() |
093e02d563 | ||
![]() |
bfe8271e6e | ||
![]() |
1224aa7aed | ||
![]() |
9970f95884 | ||
![]() |
dc55928411 | ||
![]() |
458cba3372 | ||
![]() |
50c92f1ff1 | ||
![]() |
dbd7a224f8 | ||
![]() |
ffd8baabe0 | ||
![]() |
df25d55a36 | ||
![]() |
b4aa9ae324 | ||
![]() |
08d2af63ad | ||
![]() |
697439b26b | ||
![]() |
eee6dc3314 | ||
![]() |
6c014bb6ee | ||
![]() |
58b5788df4 | ||
![]() |
9ef8c3d476 | ||
![]() |
2390a43e64 | ||
![]() |
212aa8c68b | ||
![]() |
cd9d77bc56 | ||
![]() |
7ffe27067c | ||
![]() |
a116bf5e19 | ||
![]() |
0901b9fa6d | ||
![]() |
5ac9be0ff8 | ||
![]() |
867a904f13 | ||
![]() |
3b184b115b | ||
![]() |
a707fdd2d8 | ||
![]() |
abe620d4b4 | ||
![]() |
c50ac727cb | ||
![]() |
1a0d128d9f | ||
![]() |
204c283a5c | ||
![]() |
51704f2f06 | ||
![]() |
8e7493b33d | ||
![]() |
d4bb5485b6 | ||
![]() |
100f8f8c64 | ||
![]() |
fb9dac63ac | ||
![]() |
8f42070647 | ||
![]() |
d36000754c | ||
![]() |
053e3772f0 | ||
![]() |
a927c7a2f2 | ||
![]() |
4c89fa75fb | ||
![]() |
062cbc21a6 | ||
![]() |
5c39a4b3f2 | ||
![]() |
c861c8184e | ||
![]() |
5ee013353e | ||
![]() |
4e67ac117a | ||
![]() |
9766bdc39e | ||
![]() |
5c7ac05670 | ||
![]() |
948d80e418 | ||
![]() |
bd9b943f99 | ||
![]() |
fb32c8f965 | ||
![]() |
bf80eca6ae | ||
![]() |
7af472d420 | ||
![]() |
220c781336 | ||
![]() |
84bfe8520a | ||
![]() |
192bea0f5a | ||
![]() |
5fedbe0304 | ||
![]() |
39eea135dc | ||
![]() |
685109ec7e | ||
![]() |
5a0f0dc335 | ||
![]() |
5596025da2 | ||
![]() |
9aa60afe70 | ||
![]() |
a7552fb4fa | ||
![]() |
6519ed74b9 | ||
![]() |
57bd0539d8 | ||
![]() |
d402f379fd | ||
![]() |
7daac867fe | ||
![]() |
42b0970984 | ||
![]() |
b5af73ce3a | ||
![]() |
8676206564 | ||
![]() |
346b4e5f5b | ||
![]() |
c3952d5c19 | ||
![]() |
13aff94012 | ||
![]() |
ca119ad126 | ||
![]() |
e6df2d7946 | ||
![]() |
f2d43d3b27 | ||
![]() |
56fb349d12 | ||
![]() |
d21502b469 | ||
![]() |
0b5a65fbb8 | ||
![]() |
5ab6aa8a60 | ||
![]() |
816e465f7c | ||
![]() |
8b92b368d7 | ||
![]() |
460277d532 | ||
![]() |
16eeab86c0 | ||
![]() |
82f4c410e9 | ||
![]() |
64691b8e7d | ||
![]() |
f54fe7460f | ||
![]() |
3a5091de80 | ||
![]() |
3a106f4e8a | ||
![]() |
a14ae8ea64 | ||
![]() |
6e3348b3f7 | ||
![]() |
e36a9b7edd | ||
![]() |
1764f2d23f | ||
![]() |
9e4e59cc26 | ||
![]() |
6e09cf25fd | ||
![]() |
04b73cbf0f | ||
![]() |
f4c181efa9 | ||
![]() |
6fc6261995 | ||
![]() |
d2342c4218 | ||
![]() |
04014628fb | ||
![]() |
7247b6d782 | ||
![]() |
a51be327ca | ||
![]() |
1a545e8560 | ||
![]() |
99f55598ab | ||
![]() |
2bc724c549 | ||
![]() |
f2c4b4933c | ||
![]() |
c0de65e8ff | ||
![]() |
e1705129e8 | ||
![]() |
347a9751da | ||
![]() |
be9029cccb | ||
![]() |
2eded1cbbd | ||
![]() |
680df73a6a | ||
![]() |
5e44094472 | ||
![]() |
dbb1872f2b | ||
![]() |
9f79067159 | ||
![]() |
1d9fdcbec0 | ||
![]() |
0eae628054 | ||
![]() |
567cebe8d5 | ||
![]() |
0036523bfd | ||
![]() |
ebd48501c4 | ||
![]() |
2178cd6f4d | ||
![]() |
42edfd39a6 | ||
![]() |
860d582944 | ||
![]() |
94a9748fe1 | ||
![]() |
ebcfb1dea0 | ||
![]() |
5194fa8bee | ||
![]() |
e552c6976e | ||
![]() |
71cdee0b5f | ||
![]() |
a225a79479 | ||
![]() |
267169c989 | ||
![]() |
fa627f61b9 | ||
![]() |
db1bcf9df5 | ||
![]() |
d12b7c9669 | ||
![]() |
069290fd7a | ||
![]() |
6ecdd7c083 | ||
![]() |
48d45765e2 | ||
![]() |
c55c8071fb | ||
![]() |
f0debbb7da | ||
![]() |
af3b8e6304 | ||
![]() |
781c8fe415 | ||
![]() |
0c03c0e90a | ||
![]() |
9be8f47acf | ||
![]() |
9a2272df33 | ||
![]() |
7d1a1770be | ||
![]() |
6f4d246ea9 | ||
![]() |
cf35cd96e6 | ||
![]() |
54cba1acbc | ||
![]() |
de0a608ab8 | ||
![]() |
4da2fe1822 | ||
![]() |
ceaf703741 | ||
![]() |
92120798b1 | ||
![]() |
d00b4d65ca | ||
![]() |
d5b5969a96 | ||
![]() |
75d9a20ad1 | ||
![]() |
1c99135bf6 | ||
![]() |
0c3b79b9f8 | ||
![]() |
ee49ef4407 | ||
![]() |
7d4bec6e94 | ||
![]() |
bc9d17dba1 | ||
![]() |
5cc5a6fff6 | ||
![]() |
2c46fafb24 | ||
![]() |
c16e138c15 | ||
![]() |
bfcd57032b | ||
![]() |
6517a9e32b | ||
![]() |
ee71315ceb | ||
![]() |
6bd7a12070 | ||
![]() |
5f06f75f36 | ||
![]() |
0b5e8bef2c | ||
![]() |
6a34f617f8 | ||
![]() |
8af896c3e0 | ||
![]() |
e1a4ef566d | ||
![]() |
b77476ca02 | ||
![]() |
9132d50428 | ||
![]() |
cdb40cc045 | ||
![]() |
ca2a2541cc | ||
![]() |
0ff0682670 | ||
![]() |
06945b90bc | ||
![]() |
8a61cdb9bd | ||
![]() |
285081d783 | ||
![]() |
b9e5955da6 | ||
![]() |
5758219d9a | ||
![]() |
fd3971ebfb | ||
![]() |
bd94b6a2a1 | ||
![]() |
0ed1ebd910 | ||
![]() |
e21f03a600 | ||
![]() |
84ea13c006 | ||
![]() |
cb88bade9d | ||
![]() |
18eb651a14 | ||
![]() |
30f3e53111 | ||
![]() |
3fe8a47805 | ||
![]() |
ca7e8d9c92 | ||
![]() |
44c9f09e6a | ||
![]() |
b0b8be1501 | ||
![]() |
9d9d720abd | ||
![]() |
0a88912ffa | ||
![]() |
1e6f9fe0d0 | ||
![]() |
ef3df1f9c6 | ||
![]() |
5b9e01cc86 | ||
![]() |
87078ffd80 | ||
![]() |
5fdd3b6655 | ||
![]() |
3ce26c15bb | ||
![]() |
621535166c | ||
![]() |
61fb8f5f08 | ||
![]() |
3dfcbd9ed2 | ||
![]() |
ee65c9563b | ||
![]() |
e312b4fd60 | ||
![]() |
d57972a75d | ||
![]() |
f97f13cb77 | ||
![]() |
bc8eaf0485 | ||
![]() |
e989f9b93d | ||
![]() |
998fdba852 | ||
![]() |
c9263f821e | ||
![]() |
40427bbc1b | ||
![]() |
797a47b547 | ||
![]() |
1943c35495 | ||
![]() |
e80215a116 | ||
![]() |
15f6fd9d1b | ||
![]() |
9e3db9ba0d | ||
![]() |
13948a2a44 | ||
![]() |
65874c6897 | ||
![]() |
ba63f60d9c | ||
![]() |
159b6c7c2c | ||
![]() |
fe6da42f36 | ||
![]() |
4289762236 | ||
![]() |
cde4cfac80 | ||
![]() |
c91db0ca19 | ||
![]() |
19aa03da0d | ||
![]() |
ac53cb1602 | ||
![]() |
88cd82a0af | ||
![]() |
a6612a3a7c | ||
![]() |
4950eba573 | ||
![]() |
c1ee41d4da | ||
![]() |
22fe1c6754 | ||
![]() |
c2684960fb | ||
![]() |
3d87d28b79 | ||
![]() |
f66b23621f | ||
![]() |
34b65b07a0 | ||
![]() |
f6a2ddd1e4 | ||
![]() |
6e41618898 | ||
![]() |
5993c69c3a | ||
![]() |
4aed0f0ddd | ||
![]() |
33e43f19ca | ||
![]() |
98abf2ec92 | ||
![]() |
f1add17362 | ||
![]() |
9f424f4d15 | ||
![]() |
93a7ca04e5 | ||
![]() |
0fe536975e | ||
![]() |
5ba2afc48e | ||
![]() |
824fee720b | ||
![]() |
0d409d3064 | ||
![]() |
9fd4cdc426 | ||
![]() |
ac04d762af | ||
![]() |
0f6443b07e | ||
![]() |
3e6817f7bb | ||
![]() |
c0f00edc37 | ||
![]() |
c7fcba6fc2 | ||
![]() |
2dc1d5ffa1 | ||
![]() |
089efa3873 | ||
![]() |
44e21bef3e | ||
![]() |
e719cb9730 | ||
![]() |
dcfb844721 | ||
![]() |
fc58d719e5 | ||
![]() |
a132cf9850 | ||
![]() |
68a9af6d4f | ||
![]() |
6283813159 | ||
![]() |
4ac7bbe3fc | ||
![]() |
4a39cd8650 | ||
![]() |
78929fa1b2 | ||
![]() |
0066c5bc66 | ||
![]() |
4f8b378184 | ||
![]() |
6c7eaf41b0 | ||
![]() |
21d8922938 | ||
![]() |
c60eb694a4 | ||
![]() |
5143a65f5b | ||
![]() |
6da1127bfc | ||
![]() |
9d2cc24c84 | ||
![]() |
6fa951289b | ||
![]() |
55245b4eaf | ||
![]() |
d94ae2f7c5 | ||
![]() |
acb717a362 | ||
![]() |
48cacc9e30 | ||
![]() |
abd5ee8165 | ||
![]() |
d38a4164e2 | ||
![]() |
9f308e5972 | ||
![]() |
5c6bdea910 | ||
![]() |
489fad2e64 | ||
![]() |
03000aa078 | ||
![]() |
1216be27b6 | ||
![]() |
7509e193cc | ||
![]() |
203fad5ec2 | ||
![]() |
fe9397a7ba | ||
![]() |
fb110601cc | ||
![]() |
44c9cdca2e | ||
![]() |
79fa810e2b | ||
![]() |
314114c6f8 | ||
![]() |
f213b670d3 | ||
![]() |
4cc96920fb | ||
![]() |
766462fb6f | ||
![]() |
65dc92232e | ||
![]() |
18b0900163 | ||
![]() |
9c80da1150 | ||
![]() |
21fbeb090b | ||
![]() |
bba2b00278 | ||
![]() |
fb3ff1aab8 | ||
![]() |
04c8de92cc | ||
![]() |
1d97fb019c | ||
![]() |
47aad5e15e | ||
![]() |
3a23bcb831 | ||
![]() |
2882684436 | ||
![]() |
255c786d59 | ||
![]() |
2d0bd40f5b | ||
![]() |
91d69cb7c1 | ||
![]() |
1788749c23 | ||
![]() |
9689dc2277 | ||
![]() |
af9bc8a31f | ||
![]() |
a408f2f828 | ||
![]() |
9fed2b862a | ||
![]() |
d361ff34e7 | ||
![]() |
524a9bb8cd | ||
![]() |
f945fc06b8 | ||
![]() |
eafb72dc70 | ||
![]() |
8d61ff2ec6 | ||
![]() |
16d98d233d | ||
![]() |
1b7ca620c2 | ||
![]() |
b72b64ed46 | ||
![]() |
21c91e7963 | ||
![]() |
3be31c69e9 | ||
![]() |
b420bbf6da | ||
![]() |
9064b7a57a | ||
![]() |
a2a1f3c6d5 | ||
![]() |
9482334cf8 | ||
![]() |
e4ce7086e5 | ||
![]() |
5c5b9fb817 | ||
![]() |
77a33287d4 | ||
![]() |
7f06a0668c | ||
![]() |
e6f4c0f204 | ||
![]() |
fa63af14df | ||
![]() |
a1c140a4c6 | ||
![]() |
0687f6131c | ||
![]() |
68ef9077a2 | ||
![]() |
3e612db836 | ||
![]() |
4b253c5b1b | ||
![]() |
c017b57396 | ||
![]() |
f6192c837e | ||
![]() |
a7b018ac71 | ||
![]() |
2883251222 | ||
![]() |
abbd83017c | ||
![]() |
d2cece1cb8 | ||
![]() |
78c59f7119 | ||
![]() |
0adf8e84cd | ||
![]() |
363e7d25d2 | ||
![]() |
dc5d71adb9 | ||
![]() |
116603968e | ||
![]() |
22828fd693 |
1315 changed files with 27964 additions and 24838 deletions
23
README.md
23
README.md
|
@ -1,3 +1,26 @@
|
|||
# EHCP Force Edition
|
||||
## http://ehcpforce.tk
|
||||
### Easy Hosting Control Panel
|
||||
#### Forked from http://ehcp.net
|
||||
|
||||
The Easy Hosting Control Panel (EHCP) is a fully functional, advanced, free, and open source website panel platform that provides a user interface for creating and managing multiple administrators, resellers, users, websites, FTP accounts, MySQL databases, email accounts, and more! EHCP works on most Debian based operating systems. EHCP Force Edition works best on and has been tested thoroughly on all supported versions of Ubuntu.
|
||||
|
||||
EHCP even installs and configures your web server software (by default, EHCP Force uses Apache2) for you while also providing additional security by slip streaming and including fail2ban and DDoS automatic banning (against Apache). EHCP Force now properly supports nginx (SSL and Non-SSL) integration should you wish to choose more efficient web server software.
|
||||
|
||||
Use custom SSL certificates, free Let's Encrypt certificates, wildcard SSL certificates, and more.
|
||||
|
||||
### Video
|
||||
|
||||
[](https://www.youtube.com/watch?v=QQh6eqiWogI)
|
||||
|
||||
### Screenshot of Picante Theme:
|
||||
|
||||
<a href="http://ehcpforce.tk/images/ehcp_picante.png" target="_blank"><img alt="EHCP Force Edition Easy Hosting Control Panel Main Theme Screenshot" src="http://ehcpforce.tk/images/ehcp_picante_s.jpg" class="greenBorder"></a>
|
||||
|
||||
### Home Page
|
||||
|
||||
http://ehcpforce.tk
|
||||
|
||||
### Forums for Support
|
||||
|
||||
http://ehcpforce.tk/forums
|
||||
|
|
|
@ -520,7 +520,7 @@ class ADODB_DataDict {
|
|||
list($lines,$pkey,$idxs) = $this->_GenFields($flds);
|
||||
// genfields can return FALSE at times
|
||||
if ($lines == null) $lines = array();
|
||||
list(,$first) = each($lines);
|
||||
$first = reset($lines);
|
||||
list(,$column_def) = preg_split("/[\t ]+/",$first,2);
|
||||
}
|
||||
return array(sprintf($this->renameColumn,$tabname,$this->NameQuote($oldcolumn),$this->NameQuote($newcolumn),$column_def));
|
||||
|
|
|
@ -111,7 +111,7 @@ function adodb_error_pg($errormsg)
|
|||
'could not serialize access due to' => DB_ERROR_SERIALIZATION_FAILURE
|
||||
);
|
||||
reset($error_regexps);
|
||||
while (list($regexp,$code) = each($error_regexps)) {
|
||||
foreach($error_regexps as $regexp => $code) {
|
||||
if (preg_match("/$regexp/mi", $errormsg)) {
|
||||
return $code;
|
||||
}
|
||||
|
|
|
@ -693,7 +693,7 @@ Committed_AS: 348732 kB
|
|||
|
||||
// magic quotes
|
||||
|
||||
if (isset($_GET['sql']) && get_magic_quotes_gpc()) {
|
||||
if (isset($_GET['sql']) && function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
|
||||
$_GET['sql'] = $_GET['sql'] = str_replace(array("\\'",'\"'),array("'",'"'),$_GET['sql']);
|
||||
}
|
||||
|
||||
|
@ -999,7 +999,7 @@ Committed_AS: 348732 kB
|
|||
|
||||
function undomq($m)
|
||||
{
|
||||
if (get_magic_quotes_gpc()) {
|
||||
if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
|
||||
// undo the damage
|
||||
$m = str_replace('\\\\','\\',$m);
|
||||
$m = str_replace('\"','"',$m);
|
||||
|
|
|
@ -834,7 +834,7 @@ if (!defined('_ADODB_LAYER')) {
|
|||
* Requested by "Karsten Dambekalns" <k.dambekalns@fishfarm.de>
|
||||
*/
|
||||
function QMagic($s) {
|
||||
return $this->qstr($s,get_magic_quotes_gpc());
|
||||
return $this->qstr($s,function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc());
|
||||
}
|
||||
|
||||
function q(&$s) {
|
||||
|
@ -1149,7 +1149,7 @@ if (!defined('_ADODB_LAYER')) {
|
|||
foreach($inputarr as $arr) {
|
||||
$sql = ''; $i = 0;
|
||||
//Use each() instead of foreach to reduce memory usage -mikefedyk
|
||||
while(list(, $v) = each($arr)) {
|
||||
foreach($arr as $k => $v) {
|
||||
$sql .= $sqlarr[$i];
|
||||
// from Ron Baldwin <ron.baldwin#sourceprose.com>
|
||||
// Only quote string types
|
||||
|
|
|
@ -225,7 +225,7 @@ class ADODB_ado extends ADOConnection {
|
|||
|
||||
// Map by http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdmthcreateparam.asp
|
||||
// Check issue http://bugs.php.net/bug.php?id=40664 !!!
|
||||
while(list(, $val) = each($inputarr)) {
|
||||
foreach($inputarr as $key => $val) {
|
||||
$type = gettype($val);
|
||||
$len=strlen($val);
|
||||
if ($type == 'boolean')
|
||||
|
|
|
@ -247,8 +247,8 @@ class ADODB_ado extends ADOConnection {
|
|||
$oCmd->ActiveConnection = $dbc;
|
||||
$oCmd->CommandText = $sql;
|
||||
$oCmd->CommandType = 1;
|
||||
|
||||
while(list(, $val) = each($inputarr)) {
|
||||
|
||||
foreach($inputarr as $key => $val) {
|
||||
$type = gettype($val);
|
||||
$len=strlen($val);
|
||||
if ($type == 'boolean')
|
||||
|
|
|
@ -680,7 +680,9 @@ order by constraint_name, referenced_table_name, keyno";
|
|||
$arr = $args;
|
||||
}
|
||||
|
||||
array_walk($arr, create_function('&$v', '$v = "CAST(" . $v . " AS VARCHAR(255))";'));
|
||||
array_walk($arr, function(&$v){
|
||||
$v = "CAST(" . $v . " AS VARCHAR(255))";
|
||||
});
|
||||
$s = implode('+',$arr);
|
||||
if (sizeof($arr) > 0) return "$s";
|
||||
|
||||
|
|
|
@ -530,7 +530,9 @@ class ADODB_mssqlnative extends ADOConnection {
|
|||
$arr = $args;
|
||||
}
|
||||
|
||||
array_walk($arr, create_function('&$v', '$v = "CAST(" . $v . " AS VARCHAR(255))";'));
|
||||
array_walk($arr, function(&$v){
|
||||
$v = "CAST(" . $v . " AS VARCHAR(255))";
|
||||
});
|
||||
$s = implode('+',$arr);
|
||||
if (sizeof($arr) > 0) return "$s";
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ function err($s)
|
|||
// undo stupid magic quotes
|
||||
function undomq(&$m)
|
||||
{
|
||||
if (get_magic_quotes_gpc()) {
|
||||
if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
|
||||
// undo the damage
|
||||
$m = str_replace('\\\\','\\',$m);
|
||||
$m = str_replace('\"','"',$m);
|
||||
|
|
|
@ -77,7 +77,7 @@ function _adodb_export(&$rs,$sep,$sepreplace,$fp=false,$addtitles=true,$quote =
|
|||
reset($fieldTypes);
|
||||
$i = 0;
|
||||
$elements = array();
|
||||
while(list(,$o) = each($fieldTypes)) {
|
||||
foreach($fieldTypes as $k => $o) {
|
||||
|
||||
$v = ($o) ? $o->name : 'Field'.($i++);
|
||||
if ($escquote) $v = str_replace($quote,$escquotequote,$v);
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
NameVirtualHost *
|
||||
<VirtualHost *>
|
||||
|
||||
DocumentRoot /var/www
|
||||
<Directory />
|
||||
Options FollowSymLinks
|
||||
AllowOverride None
|
||||
</Directory>
|
||||
|
||||
<Directory /var/www/>
|
||||
Options Indexes FollowSymLinks MultiViews
|
||||
AllowOverride None
|
||||
Order allow,deny
|
||||
allow from all
|
||||
</Directory>
|
||||
|
||||
|
||||
ErrorLog /var/log/apache2/error.log
|
||||
LogLevel warn
|
||||
CustomLog /var/log/apache2/access.log combined
|
||||
|
||||
|
||||
</VirtualHost>
|
|
@ -12,13 +12,12 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{homedir}:/usr/share/php:/usr/share/pear"
|
||||
php_admin_value upload_tmp_dir {homedir}/phptmpdir
|
||||
php_admin_value session.save_path 0;660;{homedir}/phptmpdir
|
||||
php_admin_value disable_functions "exec,passthru,shell_exec,system,proc_open,popen"
|
||||
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
<FilesMatch "access_log|error_log">
|
||||
Deny from All
|
||||
</FilesMatch>
|
||||
|
||||
{customsubdomainhttp}
|
||||
|
||||
|
|
|
@ -16,9 +16,8 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{ehcpdir}/webmail:/tmp:/var/www/php_sessions:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube"
|
||||
php_admin_value upload_tmp_dir "/tmp"
|
||||
php_admin_value session.save_path "/var/www/php_sessions"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/webmail/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail:/tmp:/var/www/php_sessions:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
|
@ -35,9 +34,8 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{ehcpdir}/webmail2"
|
||||
php_admin_value upload_tmp_dir "{ehcpdir}/webmail2/data"
|
||||
php_admin_value session.save_path "{ehcpdir}/webmail2/data"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/webmail2/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2; \n upload_tmp_dir={ehcpdir}/webmail2/data; \n session.save_path={ehcpdir}/webmail2/data;"
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
|
@ -53,7 +51,8 @@
|
|||
LogFormat "%v:%p %h %l %u %t \"%{Host}i\" \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined_host
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir {ehcpdir}
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/usr/share/php:/usr/share/pear"
|
||||
|
||||
<Files ~ "\.conf$">
|
||||
Order allow,deny
|
||||
|
@ -93,17 +92,11 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
# this is pear compatible:
|
||||
php_admin_value open_basedir "{homedir}:/usr/share/php:/usr/share/pear"
|
||||
php_admin_value upload_tmp_dir {homedir}/phptmpdir
|
||||
php_admin_value session.save_path 0;660;{homedir}/phptmpdir
|
||||
php_admin_value disable_functions "exec,passthru,shell_exec,system,proc_open,popen"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/httpdocs/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
AccessFileName .htaccess
|
||||
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
|
||||
{customhttp}
|
||||
{root_password_protected_dirs}
|
||||
{password_protected_dirs}
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
LogFormat "%v:%p %h %l %u %t \"%{Host}i\" \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined_host
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir {ehcpdir}
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
|
||||
<Files ~ "\.conf$">
|
||||
Order allow,deny
|
||||
|
@ -30,6 +31,22 @@
|
|||
Order allow,deny
|
||||
Deny from all
|
||||
</Files>
|
||||
|
||||
<Location "/extplorer">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/var/www:/usr/share/php:/usr/share/pear; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
<Location "/webmail">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=/var/lib/roundcube:/etc/roundcube:/usr/share:/tmp:/var/www/php_sessions:/var/log/roundcube; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
<Location "/webmail2">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2; \n upload_tmp_dir={ehcpdir}/webmail2/data; \n session.save_path={ehcpdir}/webmail2/data;"
|
||||
</Location>
|
||||
|
||||
<Location "/phpmyadmin">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
</VirtualHost>
|
||||
# END OF CUSTOM GLOBAL PANEL URLS Template
|
||||
|
|
|
@ -15,9 +15,8 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{ehcpdir}/webmail:/tmp:/var/www/php_sessions:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube"
|
||||
php_admin_value upload_tmp_dir "/tmp"
|
||||
php_admin_value session.save_path "/var/www/php_sessions"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/webmail/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail:/tmp:/var/www/php_sessions:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
|
@ -34,9 +33,8 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{ehcpdir}/webmail2"
|
||||
php_admin_value upload_tmp_dir "{ehcpdir}/webmail2/data"
|
||||
php_admin_value session.save_path "{ehcpdir}/webmail2/data"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/webmail2/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2; \n upload_tmp_dir={ehcpdir}/webmail2/data; \n session.save_path={ehcpdir}/webmail2/data;"
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *>
|
||||
|
@ -51,7 +49,8 @@
|
|||
LogFormat "%v:%p %h %l %u %t \"%{Host}i\" \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined_host
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir {ehcpdir}
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/usr/share/php:/usr/share/pear"
|
||||
|
||||
<Files ~ "\.conf$">
|
||||
Order allow,deny
|
||||
|
@ -92,17 +91,11 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
# this is pear compatible:
|
||||
php_admin_value open_basedir "{homedir}:/usr/share/php:/usr/share/pear"
|
||||
php_admin_value upload_tmp_dir "{homedir}/phptmpdir"
|
||||
php_admin_value session.save_path "{homedir}/phptmpdir"
|
||||
php_admin_value disable_functions "exec,passthru,shell_exec,system,proc_open,popen"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/httpdocs/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
AccessFileName .htaccess
|
||||
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
|
||||
{customhttp}
|
||||
{root_password_protected_dirs}
|
||||
{password_protected_dirs}
|
||||
|
|
|
@ -12,12 +12,8 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir {homedir}
|
||||
php_admin_value upload_tmp_dir {homedir}/phptmpdir
|
||||
php_admin_value disable_functions "exec,passthru,shell_exec,system,proc_open,popen"
|
||||
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
|
|
28644
ehcp/classapp.php
28644
ehcp/classapp.php
File diff suppressed because it is too large
Load diff
|
@ -9,7 +9,7 @@ CREATE TABLE IF NOT EXISTS `scripts` (
|
|||
`commandsaftercopy` text,
|
||||
`customfileownerships` text,
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARSET=latin1 COMMENT='ehcp db - stores scripts that can be installed in ehcp';
|
||||
) DEFAULT CHARSET=utf8 COMMENT='ehcp db - stores scripts that can be installed in ehcp';
|
||||
|
||||
INSERT INTO `scripts` (`id`, `scriptname`, `homepage`, `description`, `filetype`, `fileinfo`, `scriptdirtocopy`, `commandsaftercopy`, `customfileownerships`) VALUES
|
||||
(1, 'WordPress', NULL, NULL, 'directurl', 'https://wordpress.org/latest.zip', 'wordpress', '', NULL),
|
||||
|
@ -72,6 +72,8 @@ CREATE TABLE IF NOT EXISTS subdomains (
|
|||
password varchar(20) default NULL,
|
||||
email varchar(50) default NULL,
|
||||
webserverips varchar(200) default NULL,
|
||||
apache2template text NULL,
|
||||
nginxtemplate text NULL,
|
||||
PRIMARY KEY (id)
|
||||
) comment='ehcp db - subdomains';
|
||||
|
||||
|
@ -253,7 +255,7 @@ INSERT INTO misc (id, name, `value`, longvalue,comment) VALUES
|
|||
(12, 'quotaupdateinterval', '6', NULL,'this is in hours, quota will be calculated in this interval'),
|
||||
(13, 'webservertype', 'apache2', NULL,'apache2 or nginx, (or any other that is supported)'),
|
||||
(14, 'webservermode', 'nonssl', NULL,'ssl or nonssl'),
|
||||
(15, 'mysqlcharset', 'DEFAULT CHARACTER SET utf8 COLLATE utf8_turkish_ci', NULL,'Default charset/collation for newly added databases'),
|
||||
(15, 'mysqlcharset', 'DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci', NULL,'Default charset/collation for newly added databases'),
|
||||
(16, 'enablewebstats', 'on',null,'Webalizer web stats'),
|
||||
(17, 'versionwarningcounter', '5',null,'')
|
||||
;
|
||||
|
@ -275,9 +277,9 @@ CREATE TABLE mysqlusers (
|
|||
reseller varchar(30) default NULL,
|
||||
panelusername varchar(30) default NULL,
|
||||
domainname varchar(50) default NULL,
|
||||
dbname varchar(30) default NULL,
|
||||
dbname varchar(64) default NULL,
|
||||
dbusername varchar(30) default NULL,
|
||||
password varchar(30) default NULL,
|
||||
password varchar(32) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
) comment='ehcp db - list of mysql users related to ehcp';
|
||||
|
||||
|
@ -333,10 +335,10 @@ CREATE TABLE transport (
|
|||
|
||||
DROP TABLE IF EXISTS `hash`;
|
||||
CREATE TABLE IF NOT EXISTS `hash` (
|
||||
`email` varchar(100) COLLATE utf8_turkish_ci NOT NULL DEFAULT 'NULL',
|
||||
`hash` varchar(100) COLLATE utf8_turkish_ci DEFAULT NULL,
|
||||
`email` varchar(100) COLLATE utf8_general_ci NOT NULL DEFAULT 'NULL',
|
||||
`hash` varchar(100) COLLATE utf8_general_ci DEFAULT NULL,
|
||||
KEY `email_index` (`email`)
|
||||
) DEFAULT CHARSET=utf8 COLLATE=utf8_turkish_ci COMMENT='to store password remind hash';
|
||||
) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT='to store password remind hash';
|
||||
|
||||
# these are net2ftp tables for logging etc...
|
||||
DROP TABLE IF EXISTS net2ftp_logAccess;
|
||||
|
@ -356,41 +358,41 @@ CREATE TABLE net2ftp_users (ftpserver varchar(255) NOT NULL default '0',username
|
|||
|
||||
CREATE TABLE IF NOT EXISTS `vps` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`reseller` varchar(30) CHARACTER SET utf8 COLLATE utf8_turkish_ci DEFAULT NULL,
|
||||
`panelusername` varchar(30) CHARACTER SET utf8 COLLATE utf8_turkish_ci DEFAULT NULL,
|
||||
`status` varchar(20) CHARACTER SET utf8 COLLATE utf8_turkish_ci DEFAULT NULL,
|
||||
`vpsname` varchar(30) CHARACTER SET utf8 COLLATE utf8_turkish_ci NOT NULL,
|
||||
`description` varchar(100) CHARACTER SET utf8 COLLATE utf8_turkish_ci NOT NULL,
|
||||
`hostip` varchar(20) CHARACTER SET utf8 COLLATE utf8_turkish_ci NOT NULL,
|
||||
`ip` varchar(20) CHARACTER SET utf8 COLLATE utf8_turkish_ci NOT NULL,
|
||||
`ip2` varchar(20) CHARACTER SET utf8 COLLATE utf8_turkish_ci NOT NULL,
|
||||
`netmask` varchar(20) CHARACTER SET utf8 COLLATE utf8_turkish_ci NOT NULL,
|
||||
`broadcast` varchar(20) CHARACTER SET utf8 COLLATE utf8_turkish_ci NOT NULL,
|
||||
`gateway` varchar(20) CHARACTER SET utf8 COLLATE utf8_turkish_ci NOT NULL,
|
||||
`image_template` varchar(100) CHARACTER SET utf8 COLLATE utf8_turkish_ci DEFAULT NULL,
|
||||
`cdimage` varchar(100) CHARACTER SET utf8 COLLATE utf8_turkish_ci DEFAULT NULL,
|
||||
`reseller` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
|
||||
`panelusername` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
|
||||
`status` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
|
||||
`vpsname` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
|
||||
`description` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
|
||||
`hostip` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
|
||||
`ip` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
|
||||
`ip2` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
|
||||
`netmask` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
|
||||
`broadcast` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
|
||||
`gateway` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
|
||||
`image_template` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
|
||||
`cdimage` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
|
||||
`ram` int(11) DEFAULT NULL,
|
||||
`cpu` int(11) DEFAULT NULL,
|
||||
`state` varchar(20) CHARACTER SET utf8 COLLATE utf8_turkish_ci DEFAULT NULL,
|
||||
`ping` varchar(10) CHARACTER SET utf8 COLLATE utf8_turkish_ci DEFAULT NULL,
|
||||
`state` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
|
||||
`ping` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
|
||||
`hdimage` varchar(200) DEFAULT NULL,
|
||||
`vncpassword` varchar(20) DEFAULT NULL,
|
||||
`addvpscmd` text default null,
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARSET=latin1 COMMENT='ehcp db - list of domains and their properties';
|
||||
) DEFAULT CHARSET=utf8 COMMENT='ehcp db - list of domains and their properties';
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `settings` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`group` varchar(20) CHARACTER SET utf8 COLLATE utf8_turkish_ci DEFAULT '',
|
||||
`reseller` varchar(30) CHARACTER SET utf8 COLLATE utf8_turkish_ci DEFAULT '',
|
||||
`panelusername` varchar(30) CHARACTER SET utf8 COLLATE utf8_turkish_ci DEFAULT '',
|
||||
`name` varchar(40) CHARACTER SET utf8 COLLATE utf8_turkish_ci DEFAULT '',
|
||||
`value` text CHARACTER SET utf8 COLLATE utf8_turkish_ci,
|
||||
`longvalue` text CHARACTER SET utf8 COLLATE utf8_turkish_ci,
|
||||
`comment` varchar(100) CHARACTER SET utf8 COLLATE utf8_turkish_ci DEFAULT '',
|
||||
`group` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '',
|
||||
`reseller` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '',
|
||||
`panelusername` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '',
|
||||
`name` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '',
|
||||
`value` text CHARACTER SET utf8 COLLATE utf8_general_ci,
|
||||
`longvalue` text CHARACTER SET utf8 COLLATE utf8_general_ci,
|
||||
`comment` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARSET=latin1 COMMENT='ehcp db - Table for misc configruation of ehcp';
|
||||
) DEFAULT CHARSET=utf8 COMMENT='ehcp db - Table for misc configruation of ehcp';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `remote_backups` (
|
||||
`id` tinyint(4) NOT NULL auto_increment,
|
||||
|
@ -404,7 +406,7 @@ CREATE TABLE IF NOT EXISTS `remote_backups` (
|
|||
`transfer_pass` varchar(50) default NULL,
|
||||
`encryption_pass` varchar(50) default NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARSET=latin1 COMMENT='Used to schedule cronjobs for remote backups';
|
||||
) DEFAULT CHARSET=utf8 COMMENT='Used to schedule cronjobs for remote backups';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `cronjobs` (
|
||||
`id` tinyint(4) NOT NULL auto_increment,
|
||||
|
@ -412,7 +414,7 @@ CREATE TABLE IF NOT EXISTS `cronjobs` (
|
|||
`dayofweek` tinyint(1) default NULL,
|
||||
`time` varchar(2),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARSET=latin1 COMMENT='Used to run any cronjobs an admin may want to run';
|
||||
) DEFAULT CHARSET=utf8 COMMENT='Used to run any cronjobs an admin may want to run';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `pwd_dirs` (
|
||||
id int(11) NOT NULL auto_increment,
|
||||
|
|
|
@ -45,7 +45,7 @@ CREATE TABLE `ftpaccounts` (
|
|||
`reseller` varchar(30) default NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `username` (`ftpusername`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
|
||||
|
||||
--
|
||||
-- Tablo d<>k<EFBFBD>m verisi `ftpaccounts`
|
||||
|
@ -67,7 +67,7 @@ CREATE TABLE `ftpaccounts` (
|
|||
`reseller` varchar(30) default NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `ftpusername` (`ftpusername`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
|
||||
|
||||
--
|
||||
-- Tablo d<>k<EFBFBD>m verisi `ftpaccounts`
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -11,13 +11,12 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{homedir}:/usr/share/php:/usr/share/pear"
|
||||
php_admin_value upload_tmp_dir "{homedir}/phptmpdir"
|
||||
php_admin_value session.save_path "{homedir}/phptmpdir"
|
||||
php_admin_value disable_functions "exec,passthru,shell_exec,system,proc_open,popen"
|
||||
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
<FilesMatch "access_log|error_log">
|
||||
Deny from All
|
||||
</FilesMatch>
|
||||
|
||||
{customsubdomainhttp}
|
||||
|
||||
|
|
|
@ -12,13 +12,12 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{homedir}:/usr/share/php:/usr/share/pear"
|
||||
php_admin_value upload_tmp_dir "{homedir}/phptmpdir"
|
||||
php_admin_value session.save_path "{homedir}/phptmpdir"
|
||||
php_admin_value disable_functions "exec,passthru,shell_exec,system,proc_open,popen"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
<FilesMatch "access_log|error_log">
|
||||
Deny from All
|
||||
</FilesMatch>
|
||||
|
||||
{customsubdomainhttp}
|
||||
|
||||
|
|
|
@ -16,9 +16,8 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{ehcpdir}/webmail:/tmp:/var/www/php_sessions:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube"
|
||||
php_admin_value upload_tmp_dir "/tmp"
|
||||
php_admin_value session.save_path "/var/www/php_sessions"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/webmail/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail:/tmp:/var/www/php_sessions:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
|
@ -35,9 +34,9 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{ehcpdir}/webmail2"
|
||||
php_admin_value upload_tmp_dir "{ehcpdir}/webmail2/data"
|
||||
php_admin_value session.save_path "{ehcpdir}/webmail2/data"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/webmail2/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2; \n upload_tmp_dir={ehcpdir}/webmail2/data; \n session.save_path={ehcpdir}/webmail2/data;"
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *>
|
||||
|
@ -71,8 +70,9 @@
|
|||
Order allow,deny
|
||||
Deny from all
|
||||
</Files>
|
||||
|
||||
php_admin_value open_basedir {ehcpdir}
|
||||
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/usr/share/php:/usr/share/pear"
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
|
@ -94,17 +94,11 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
# this is pear compatible:
|
||||
php_admin_value open_basedir "{homedir}:/usr/share/php:/usr/share/pear"
|
||||
php_admin_value upload_tmp_dir "{homedir}/phptmpdir"
|
||||
php_admin_value session.save_path "{homedir}/phptmpdir"
|
||||
php_admin_value disable_functions "exec,passthru,shell_exec,system,proc_open,popen"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/httpdocs/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
AccessFileName .htaccess
|
||||
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
|
||||
{customhttp}
|
||||
{root_password_protected_dirs}
|
||||
{password_protected_dirs}
|
||||
|
|
|
@ -29,7 +29,24 @@
|
|||
Deny from all
|
||||
</Files>
|
||||
|
||||
php_admin_value open_basedir {ehcpdir}
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
|
||||
<Location "/extplorer">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/var/www:/usr/share/php:/usr/share/pear; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
<Location "/webmail">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=/var/lib/roundcube:/etc/roundcube:/usr/share:/tmp:/var/www/php_sessions:/var/log/roundcube; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
<Location "/webmail2">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2; \n upload_tmp_dir={ehcpdir}/webmail2/data; \n session.save_path={ehcpdir}/webmail2/data;"
|
||||
</Location>
|
||||
|
||||
<Location "/phpmyadmin">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
</VirtualHost>
|
||||
# END OF CUSTOM GLOBAL PANEL URLS Template
|
||||
|
|
|
@ -15,9 +15,8 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{ehcpdir}/webmail:/tmp:/var/www/php_sessions:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube"
|
||||
php_admin_value upload_tmp_dir "/tmp"
|
||||
php_admin_value session.save_path "/var/www/php_sessions"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/webmail/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail:/tmp:/var/www/php_sessions:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
|
@ -34,9 +33,8 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{ehcpdir}/webmail2"
|
||||
php_admin_value upload_tmp_dir "{ehcpdir}/webmail2/data"
|
||||
php_admin_value session.save_path "{ehcpdir}/webmail2/data"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/webmail2/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2; \n upload_tmp_dir={ehcpdir}/webmail2/data; \n session.save_path={ehcpdir}/webmail2/data;"
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
|
@ -52,7 +50,8 @@
|
|||
LogFormat "%v:%p %h %l %u %t \"%{Host}i\" \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined_host
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir {ehcpdir}
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/usr/share/php:/usr/share/pear"
|
||||
|
||||
<Files ~ "\.conf$">
|
||||
Order allow,deny
|
||||
|
@ -93,16 +92,10 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
# this is pear compatible:
|
||||
php_admin_value open_basedir "{homedir}:/usr/share/php:/usr/share/pear"
|
||||
php_admin_value upload_tmp_dir "{homedir}/phptmpdir"
|
||||
php_admin_value session.save_path "{homedir}/phptmpdir"
|
||||
php_admin_value disable_functions "exec,passthru,shell_exec,system,proc_open,popen"
|
||||
|
||||
AccessFileName .htaccess
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/httpdocs/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
AccessFileName .htaccess
|
||||
|
||||
{customhttp}
|
||||
{root_password_protected_dirs}
|
||||
|
|
|
@ -12,13 +12,8 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{homedir}"
|
||||
php_admin_value upload_tmp_dir "{homedir}/phptmpdir"
|
||||
php_admin_value session.save_path "{homedir}/phptmpdir"
|
||||
php_admin_value disable_functions "exec,passthru,shell_exec,system,proc_open,popen"
|
||||
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
|
|
|
@ -34,9 +34,9 @@
|
|||
ErrorLog /var/log/apache2/default.error.log
|
||||
CustomLog /var/log/apache2/default.access.log vhost_combined
|
||||
|
||||
php_admin_value open_basedir "/var/www:/tmp:/usr/share:/etc/roundcube:/etc/phpmyadmin:/var/lib/phpmyadmin:/var/lib/roundcube:/var/log/roundcube"
|
||||
php_admin_value upload_tmp_dir "/tmp"
|
||||
php_admin_value session.save_path "/var/www/php_sessions"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001/var/www/new/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=/var/www:/tmp:/usr/share:/etc/roundcube:/etc/phpmyadmin:/var/lib/phpmyadmin:/var/lib/roundcube:/var/log/roundcube; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# this file used in Easy Hosting Control Panel (ehcp), www.ehcp.net
|
||||
<VirtualHost *>
|
||||
ServerName {domainname}
|
||||
ServerAlias www.{domainname} *.{domainname}
|
||||
RewriteEngine On
|
||||
RewriteCond %{HTTPS} off
|
||||
RewriteRule (.*) {domainname_redirect}%{REQUEST_URI}
|
||||
ServerName {domainname}
|
||||
ServerAlias www.{domainname} *.{domainname}
|
||||
RewriteEngine On
|
||||
RewriteCond %{HTTPS} off
|
||||
RewriteRule (.*) {domainname_redirect}%{REQUEST_URI}
|
||||
</VirtualHost>
|
||||
|
|
|
@ -12,13 +12,12 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{homedir}"
|
||||
php_admin_value upload_tmp_dir "{homedir}/phptmpdir"
|
||||
php_admin_value session.save_path "{homedir}/phptmpdir"
|
||||
php_admin_value disable_functions "exec,passthru,shell_exec,system,proc_open,popen"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
<FilesMatch "access_log|error_log">
|
||||
Deny from All
|
||||
</FilesMatch>
|
||||
|
||||
{customsubdomainhttp}
|
||||
|
||||
|
@ -42,15 +41,14 @@
|
|||
SSLCertificateKeyFile {ssl_cert_key_path}
|
||||
{ssl_cert_chain_setting_with_path}
|
||||
|
||||
php_admin_value open_basedir "{homedir}"
|
||||
php_admin_value upload_tmp_dir "{homedir}/phptmpdir"
|
||||
php_admin_value session.save_path "{homedir}/phptmpdir"
|
||||
php_admin_value disable_functions "exec,passthru,shell_exec,system,proc_open,popen"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
<FilesMatch "access_log|error_log">
|
||||
Deny from All
|
||||
</FilesMatch>
|
||||
|
||||
{customsubdomainhttp}
|
||||
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
|
|
|
@ -16,9 +16,8 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{ehcpdir}/webmail:/tmp:/var/www/php_sessions:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube"
|
||||
php_admin_value upload_tmp_dir "/tmp"
|
||||
php_admin_value session.save_path "/var/www/php_sessions"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/webmail/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail:/tmp:/var/www/php_sessions:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
|
@ -35,9 +34,8 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{ehcpdir}/webmail2"
|
||||
php_admin_value upload_tmp_dir "{ehcpdir}/webmail2/data"
|
||||
php_admin_value session.save_path "{ehcpdir}/webmail2/data"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/webmail2/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2; \n upload_tmp_dir={ehcpdir}/webmail2/data; \n session.save_path={ehcpdir}/webmail2/data;"
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
|
@ -53,7 +51,8 @@
|
|||
LogFormat "%v:%p %h %l %u %t \"%{Host}i\" \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined_host
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir {ehcpdir}
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/usr/share/php:/usr/share/pear"
|
||||
|
||||
<Files ~ "\.conf$">
|
||||
Order allow,deny
|
||||
|
@ -86,24 +85,19 @@
|
|||
|
||||
UseCanonicalName Off
|
||||
DocumentRoot {homedir}/httpdocs
|
||||
|
||||
|
||||
# this combined log format is understandable by webalizer... some other formats are not recognised by webalizer.. thats why, specified here explicitly..
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||
LogFormat "%v:%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
|
||||
LogFormat "%v:%p %h %l %u %t \"%{Host}i\" \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined_host
|
||||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{homedir}"
|
||||
php_admin_value upload_tmp_dir "{homedir}/phptmpdir"
|
||||
php_admin_value session.save_path "{homedir}/phptmpdir"
|
||||
php_admin_value disable_functions "exec,passthru,shell_exec,system,proc_open,popen"
|
||||
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/httpdocs/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
AccessFileName .htaccess
|
||||
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
|
||||
|
||||
{customhttp}
|
||||
{root_password_protected_dirs}
|
||||
{password_protected_dirs}
|
||||
|
@ -127,9 +121,8 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{ehcpdir}/webmail:/tmp:/var/www/php_sessions:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube"
|
||||
php_admin_value upload_tmp_dir "/tmp"
|
||||
php_admin_value session.save_path "/var/www/php_sessions"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/webmail/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail:/tmp:/var/www/php_sessions:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile {ssl_cert_path}
|
||||
|
@ -151,9 +144,8 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{ehcpdir}/webmail2"
|
||||
php_admin_value upload_tmp_dir "{ehcpdir}/webmail2/data"
|
||||
php_admin_value session.save_path "{ehcpdir}/webmail2/data"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/webmail2/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2; \n upload_tmp_dir={ehcpdir}/webmail2/data; \n session.save_path={ehcpdir}/webmail2/data;"
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile {ssl_cert_path}
|
||||
|
@ -174,7 +166,8 @@
|
|||
LogFormat "%v:%p %h %l %u %t \"%{Host}i\" \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined_host
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir {ehcpdir}
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/usr/share/php:/usr/share/pear"
|
||||
|
||||
<Files ~ "\.conf$">
|
||||
Order allow,deny
|
||||
|
@ -212,18 +205,16 @@
|
|||
UseCanonicalName Off
|
||||
DocumentRoot {homedir}/httpdocs
|
||||
DirectoryIndex index.htm index.html index.php
|
||||
|
||||
|
||||
# this combined log format is understandable by webalizer... some other formats are not recognised by webalizer.. thats why, specified here explicitly..
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||
LogFormat "%v:%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
|
||||
LogFormat "%v:%p %h %l %u %t \"%{Host}i\" \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined_host
|
||||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{homedir}"
|
||||
php_admin_value upload_tmp_dir "{homedir}/phptmpdir"
|
||||
php_admin_value session.save_path "{homedir}/phptmpdir"
|
||||
php_admin_value disable_functions "exec,passthru,shell_exec,system,proc_open,popen"
|
||||
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/httpdocs/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
AccessFileName .htaccess
|
||||
SSLEngine on
|
||||
|
@ -231,9 +222,6 @@
|
|||
SSLCertificateKeyFile {ssl_cert_key_path}
|
||||
{ssl_cert_chain_setting_with_path}
|
||||
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
|
||||
{customhttp}
|
||||
{root_password_protected_dirs}
|
||||
{password_protected_dirs}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<VirtualHost *:80>
|
||||
ServerName {domainname}
|
||||
ServerAlias {domainname_alias}
|
||||
RewriteEngine On
|
||||
RewriteEngine On
|
||||
RewriteCond %{HTTPS} off
|
||||
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
|
||||
</VirtualHost>
|
||||
|
@ -17,7 +17,8 @@
|
|||
LogFormat "%v:%p %h %l %u %t \"%{Host}i\" \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined_host
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir {ehcpdir}
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
|
||||
<Files ~ "\.conf$">
|
||||
Order allow,deny
|
||||
|
@ -38,6 +39,22 @@
|
|||
Order allow,deny
|
||||
Deny from all
|
||||
</Files>
|
||||
|
||||
<Location "/extplorer">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/var/www:/usr/share/php:/usr/share/pear; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
<Location "/webmail">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=/var/lib/roundcube:/etc/roundcube:/usr/share:/tmp:/var/www/php_sessions:/var/log/roundcube; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
<Location "/webmail2">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2; \n upload_tmp_dir={ehcpdir}/webmail2/data; \n session.save_path={ehcpdir}/webmail2/data;"
|
||||
</Location>
|
||||
|
||||
<Location "/phpmyadmin">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile {ssl_cert_path}
|
||||
|
|
|
@ -16,9 +16,8 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{ehcpdir}/webmail:/tmp:/var/www/php_sessions:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube"
|
||||
php_admin_value upload_tmp_dir "/tmp"
|
||||
php_admin_value session.save_path "/var/www/php_sessions"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/webmail/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail:/tmp:/var/www/php_sessions:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
|
@ -35,9 +34,8 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{ehcpdir}/webmail2"
|
||||
php_admin_value upload_tmp_dir "{ehcpdir}/webmail2/data"
|
||||
php_admin_value session.save_path "{ehcpdir}/webmail2/data"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/webmail2/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2; \n upload_tmp_dir={ehcpdir}/webmail2/data; \n session.save_path={ehcpdir}/webmail2/data;"
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
|
@ -53,7 +51,8 @@
|
|||
LogFormat "%v:%p %h %l %u %t \"%{Host}i\" \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined_host
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir {ehcpdir}
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/usr/share/php:/usr/share/pear"
|
||||
|
||||
<Files ~ "\.conf$">
|
||||
Order allow,deny
|
||||
|
@ -87,23 +86,18 @@
|
|||
UseCanonicalName Off
|
||||
DocumentRoot {homedir}/httpdocs
|
||||
DirectoryIndex index.htm index.html index.php
|
||||
|
||||
|
||||
# this combined log format is understandable by webalizer... some other formats are not recognised by webalizer.. thats why, specified here explicitly..
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||
LogFormat "%v:%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
|
||||
LogFormat "%v:%p %h %l %u %t \"%{Host}i\" \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined_host
|
||||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{homedir}"
|
||||
php_admin_value upload_tmp_dir "{homedir}/phptmpdir"
|
||||
php_admin_value session.save_path "{homedir}/phptmpdir"
|
||||
php_admin_value disable_functions "exec,passthru,shell_exec,system,proc_open,popen"
|
||||
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/httpdocs/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
AccessFileName .htaccess
|
||||
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
|
||||
{customhttp}
|
||||
{root_password_protected_dirs}
|
||||
|
@ -128,9 +122,8 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{ehcpdir}/webmail:/tmp:/var/www/php_sessions:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube"
|
||||
php_admin_value upload_tmp_dir "/tmp"
|
||||
php_admin_value session.save_path "/var/www/php_sessions"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/webmail/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail:/tmp:/var/www/php_sessions:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile {ssl_cert_path}
|
||||
|
@ -152,9 +145,8 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{ehcpdir}/webmail2"
|
||||
php_admin_value upload_tmp_dir "{ehcpdir}/webmail2/data"
|
||||
php_admin_value session.save_path "{ehcpdir}/webmail2/data"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/webmail2/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2; \n upload_tmp_dir={ehcpdir}/webmail2/data; \n session.save_path={ehcpdir}/webmail2/data;"
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile {ssl_cert_path}
|
||||
|
@ -175,7 +167,8 @@
|
|||
LogFormat "%v:%p %h %l %u %t \"%{Host}i\" \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined_host
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir {ehcpdir}
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/usr/share/php:/usr/share/pear"
|
||||
|
||||
<Files ~ "\.conf$">
|
||||
Order allow,deny
|
||||
|
@ -214,28 +207,23 @@
|
|||
UseCanonicalName Off
|
||||
DocumentRoot {homedir}/httpdocs
|
||||
DirectoryIndex index.htm index.html index.php
|
||||
|
||||
|
||||
# this combined log format is understandable by webalizer... some other formats are not recognised by webalizer.. thats why, specified here explicitly..
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||
LogFormat "%v:%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
|
||||
LogFormat "%v:%p %h %l %u %t \"%{Host}i\" \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined_host
|
||||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{homedir}"
|
||||
php_admin_value upload_tmp_dir "{homedir}/phptmpdir"
|
||||
php_admin_value session.save_path "{homedir}/phptmpdir"
|
||||
php_admin_value disable_functions "exec,passthru,shell_exec,system,proc_open,popen"
|
||||
|
||||
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/httpdocs/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
AccessFileName .htaccess
|
||||
SSLEngine on
|
||||
SSLCertificateFile {ssl_cert_path}
|
||||
SSLCertificateKeyFile {ssl_cert_key_path}
|
||||
{ssl_cert_chain_setting_with_path}
|
||||
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
|
||||
{customhttp}
|
||||
{root_password_protected_dirs}
|
||||
{password_protected_dirs}
|
||||
|
|
|
@ -12,13 +12,9 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{homedir}"
|
||||
php_admin_value upload_tmp_dir "{homedir}/phptmpdir"
|
||||
php_admin_value session.save_path "{homedir}/phptmpdir"
|
||||
php_admin_value disable_functions "exec,passthru,shell_exec,system,proc_open,popen"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:443>
|
||||
|
@ -31,17 +27,13 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{homedir}"
|
||||
php_admin_value upload_tmp_dir "{homedir}/phptmpdir"
|
||||
php_admin_value disable_functions "exec,passthru,shell_exec,system,proc_open,popen"
|
||||
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile {ssl_cert_path}
|
||||
SSLCertificateKeyFile {ssl_cert_key_path}
|
||||
{ssl_cert_chain_setting_with_path}
|
||||
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
|
|
|
@ -32,9 +32,8 @@
|
|||
ErrorLog /var/log/apache2/default.error.log
|
||||
CustomLog /var/log/apache2/default.access.log vhost_combined
|
||||
|
||||
php_admin_value open_basedir "/var/www:/tmp:/usr/share:/etc/roundcube:/etc/phpmyadmin:/var/lib/phpmyadmin:/var/lib/roundcube:/var/log/roundcube"
|
||||
php_admin_value upload_tmp_dir "/tmp"
|
||||
php_admin_value session.save_path "/var/www/php_sessions"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001/var/www/new/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=/var/www:/tmp:/usr/share:/etc/roundcube:/etc/phpmyadmin:/var/lib/phpmyadmin:/var/lib/roundcube:/var/log/roundcube; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
|
@ -88,8 +87,7 @@
|
|||
SSLCertificateFile /etc/ssl/certs/server.crt
|
||||
SSLCertificateKeyFile /etc/ssl/private/server.key
|
||||
|
||||
php_admin_value open_basedir "/var/www:/tmp:/usr/share:/etc/roundcube:/etc/phpmyadmin:/var/lib/phpmyadmin:/var/lib/roundcube:/var/log/roundcube"
|
||||
php_admin_value upload_tmp_dir "/tmp"
|
||||
php_admin_value session.save_path "/var/www/php_sessions"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001/var/www/new/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=/var/www:/tmp:/usr/share:/etc/roundcube:/etc/phpmyadmin:/var/lib/phpmyadmin:/var/lib/roundcube:/var/log/roundcube; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
|
||||
</VirtualHost>
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
# this file used in Easy Hosting Control Panel (ehcp), www.ehcp.net
|
||||
<VirtualHost *:80>
|
||||
ServerName {domainname}
|
||||
ServerAlias www.{domainname} *.{domainname}
|
||||
RewriteEngine On
|
||||
RewriteCond %{HTTPS} off
|
||||
RewriteRule (.*) {domainname_redirect}%{REQUEST_URI}
|
||||
ServerName {domainname}
|
||||
ServerAlias www.{domainname} *.{domainname}
|
||||
RewriteEngine On
|
||||
RewriteCond %{HTTPS} off
|
||||
RewriteRule (.*) {domainname_redirect}%{REQUEST_URI}
|
||||
</VirtualHost>
|
||||
|
||||
# FOR SSL CONFIG
|
||||
|
||||
<VirtualHost *:443>
|
||||
ServerName {domainname}
|
||||
ServerAlias www.{domainname} *.{domainname}
|
||||
SSLEngine on
|
||||
SSLCertificateFile /etc/ssl/certs/server.crt
|
||||
SSLCertificateKeyFile /etc/ssl/private/server.key
|
||||
RewriteEngine On
|
||||
RewriteCond %{HTTPS} on
|
||||
RewriteRule (.*) {domainname_redirect}%{REQUEST_URI}
|
||||
ServerName {domainname}
|
||||
ServerAlias www.{domainname} *.{domainname}
|
||||
SSLEngine on
|
||||
SSLCertificateFile /etc/ssl/certs/server.crt
|
||||
SSLCertificateKeyFile /etc/ssl/private/server.key
|
||||
RewriteEngine On
|
||||
RewriteCond %{HTTPS} on
|
||||
RewriteRule (.*) {domainname_redirect}%{REQUEST_URI}
|
||||
</VirtualHost>
|
||||
|
|
|
@ -12,18 +12,17 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{homedir}:/usr/share/php:/usr/share/pear"
|
||||
php_admin_value upload_tmp_dir "{homedir}/phptmpdir"
|
||||
php_admin_value session.save_path "{homedir}/phptmpdir"
|
||||
php_admin_value disable_functions "exec,passthru,shell_exec,system,proc_open,popen"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile {ssl_cert_path}
|
||||
SSLCertificateKeyFile {ssl_cert_key_path}
|
||||
{ssl_cert_chain_setting_with_path}
|
||||
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
|
||||
<FilesMatch "access_log|error_log">
|
||||
Deny from All
|
||||
</FilesMatch>
|
||||
|
||||
{customsubdomainhttp}
|
||||
|
||||
|
|
|
@ -16,9 +16,8 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{ehcpdir}/webmail:/tmp:/var/www/php_sessions:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube"
|
||||
php_admin_value upload_tmp_dir "/tmp"
|
||||
php_admin_value session.save_path "/var/www/php_sessions"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/webmail/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail:/tmp:/var/www/php_sessions:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile {ssl_cert_path}
|
||||
|
@ -40,9 +39,8 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{ehcpdir}/webmail2"
|
||||
php_admin_value upload_tmp_dir "{ehcpdir}/webmail2/data"
|
||||
php_admin_value session.save_path "{ehcpdir}/webmail2/data"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/webmail2/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2; \n upload_tmp_dir={ehcpdir}/webmail2/data; \n session.save_path={ehcpdir}/webmail2/data;"
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile {ssl_cert_path}
|
||||
|
@ -63,7 +61,8 @@
|
|||
LogFormat "%v:%p %h %l %u %t \"%{Host}i\" \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined_host
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir {ehcpdir}
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/usr/share/php:/usr/share/pear"
|
||||
|
||||
<Files ~ "\.conf$">
|
||||
Order allow,deny
|
||||
|
@ -100,18 +99,16 @@
|
|||
UseCanonicalName Off
|
||||
DocumentRoot {homedir}/httpdocs
|
||||
DirectoryIndex index.htm index.html index.php
|
||||
|
||||
|
||||
# this combined log format is understandable by webalizer... some other formats are not recognised by webalizer.. thats why, specified here explicitly..
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||
LogFormat "%v:%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
|
||||
LogFormat "%v:%p %h %l %u %t \"%{Host}i\" \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined_host
|
||||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{homedir}:/usr/share/php:/usr/share/pear"
|
||||
php_admin_value upload_tmp_dir "{homedir}/phptmpdir"
|
||||
php_admin_value session.save_path "{homedir}/phptmpdir"
|
||||
php_admin_value disable_functions "exec,passthru,shell_exec,system,proc_open,popen"
|
||||
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/httpdocs/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
AccessFileName .htaccess
|
||||
SSLEngine on
|
||||
|
@ -119,9 +116,6 @@
|
|||
SSLCertificateKeyFile {ssl_cert_key_path}
|
||||
{ssl_cert_chain_setting_with_path}
|
||||
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
|
||||
{customhttp}
|
||||
{root_password_protected_dirs}
|
||||
{password_protected_dirs}
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
LogFormat "%v:%p %h %l %u %t \"%{Host}i\" \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined_host
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir {ehcpdir}
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
|
||||
<Files ~ "\.conf$">
|
||||
Order allow,deny
|
||||
|
@ -30,6 +31,22 @@
|
|||
Order allow,deny
|
||||
Deny from all
|
||||
</Files>
|
||||
|
||||
<Location "/extplorer">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/var/www:/usr/share/php:/usr/share/pear; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
<Location "/webmail">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=/var/lib/roundcube:/etc/roundcube:/usr/share:/tmp:/var/www/php_sessions:/var/log/roundcube; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
<Location "/webmail2">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2; \n upload_tmp_dir={ehcpdir}/webmail2/data; \n session.save_path={ehcpdir}/webmail2/data;"
|
||||
</Location>
|
||||
|
||||
<Location "/phpmyadmin">
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
</Location>
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile {ssl_cert_path}
|
||||
|
|
|
@ -16,9 +16,8 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{ehcpdir}/webmail:/tmp:/var/www/php_sessions:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube"
|
||||
php_admin_value upload_tmp_dir "/tmp"
|
||||
php_admin_value session.save_path "/var/www/php_sessions"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/webmail/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail:/tmp:/var/www/php_sessions:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile {ssl_cert_path}
|
||||
|
@ -40,9 +39,8 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{ehcpdir}/webmail2"
|
||||
php_admin_value upload_tmp_dir "{ehcpdir}/webmail2/data"
|
||||
php_admin_value session.save_path "{ehcpdir}/webmail2/data"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/webmail2/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2; \n upload_tmp_dir={ehcpdir}/webmail2/data; \n session.save_path={ehcpdir}/webmail2/data;"
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile {ssl_cert_path}
|
||||
|
@ -63,7 +61,8 @@
|
|||
LogFormat "%v:%p %h %l %u %t \"%{Host}i\" \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined_host
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir {ehcpdir}
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001{ehcpdir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/usr/share/php:/usr/share/pear"
|
||||
|
||||
<Files ~ "\.conf$">
|
||||
Order allow,deny
|
||||
|
@ -101,18 +100,16 @@
|
|||
UseCanonicalName Off
|
||||
DocumentRoot {homedir}/httpdocs
|
||||
DirectoryIndex index.htm index.html index.php
|
||||
|
||||
|
||||
# this combined log format is understandable by webalizer... some other formats are not recognised by webalizer.. thats why, specified here explicitly..
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||
LogFormat "%v:%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
|
||||
LogFormat "%v:%p %h %l %u %t \"%{Host}i\" \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined_host
|
||||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{homedir}:/usr/share/php:/usr/share/pear"
|
||||
php_admin_value upload_tmp_dir "{homedir}/phptmpdir"
|
||||
php_admin_value session.save_path "{homedir}/phptmpdir"
|
||||
php_admin_value disable_functions "exec,passthru,shell_exec,system,proc_open,popen"
|
||||
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/httpdocs/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
AccessFileName .htaccess
|
||||
SSLEngine on
|
||||
|
@ -120,9 +117,6 @@
|
|||
SSLCertificateKeyFile {ssl_cert_key_path}
|
||||
{ssl_cert_chain_setting_with_path}
|
||||
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
|
||||
{customhttp}
|
||||
{root_password_protected_dirs}
|
||||
{password_protected_dirs}
|
||||
|
|
|
@ -13,19 +13,14 @@
|
|||
CustomLog {homedir}/logs/access_log combined
|
||||
CustomLog /var/log/apache2/access_log_multi.log vhost_combined_host
|
||||
|
||||
php_admin_value open_basedir "{homedir}"
|
||||
php_admin_value upload_tmp_dir "{homedir}/phptmpdir"
|
||||
php_admin_value session.save_path "{homedir}/phptmpdir"
|
||||
php_admin_value disable_functions "exec,passthru,shell_exec,system,proc_open,popen"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000{homedir}/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear; \n upload_tmp_dir={homedir}/phptmpdir; \n session.save_path={homedir}/phptmpdir;"
|
||||
|
||||
SSLEngine on
|
||||
SSLCertificateFile {ssl_cert_path}
|
||||
SSLCertificateKeyFile {ssl_cert_key_path}
|
||||
{ssl_cert_chain_setting_with_path}
|
||||
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
Header set Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
#____________end of {domainname}__paneluser:{panelusername}_reseller:{reseller}_id:{id}____________
|
||||
|
|
|
@ -6,10 +6,6 @@
|
|||
RewriteCond %{HTTPS} off
|
||||
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
|
||||
|
||||
php_admin_value open_basedir "/var/www:/tmp:/usr/share:/etc/roundcube:/etc/phpmyadmin:/var/lib/phpmyadmin:/var/lib/roundcube:/var/log/roundcube"
|
||||
php_admin_value upload_tmp_dir "/tmp"
|
||||
php_admin_value session.save_path "/var/www/php_sessions"
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
# this file used in Easy Hosting Control Panel (ehcp), www.ehcp.net
|
||||
|
@ -62,8 +58,7 @@
|
|||
SSLCertificateFile /etc/ssl/certs/server.crt
|
||||
SSLCertificateKeyFile /etc/ssl/private/server.key
|
||||
|
||||
php_admin_value open_basedir "/var/www:/tmp:/usr/share:/etc/roundcube:/etc/phpmyadmin:/var/lib/phpmyadmin:/var/lib/roundcube:/var/log/roundcube"
|
||||
php_admin_value upload_tmp_dir "/tmp"
|
||||
php_admin_value session.save_path "/var/www/php_sessions"
|
||||
ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9001/var/www/new/$1
|
||||
ProxyFCGISetEnvIf "true" PHP_ADMIN_VALUE "open_basedir=/var/www:/tmp:/usr/share:/etc/roundcube:/etc/phpmyadmin:/var/lib/phpmyadmin:/var/lib/roundcube:/var/log/roundcube; \n upload_tmp_dir=/tmp; \n session.save_path=/var/www/php_sessions;"
|
||||
|
||||
</VirtualHost>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
# this file used in Easy Hosting Control Panel (ehcp), www.ehcp.net
|
||||
|
||||
<VirtualHost *:443>
|
||||
ServerName {domainname}
|
||||
ServerAlias www.{domainname} *.{domainname}
|
||||
SSLEngine on
|
||||
SSLCertificateFile /etc/ssl/certs/server.crt
|
||||
SSLCertificateKeyFile /etc/ssl/private/server.key
|
||||
RewriteEngine On
|
||||
RewriteCond %{HTTPS} on
|
||||
RewriteRule (.*) {domainname_redirect}%{REQUEST_URI}
|
||||
ServerName {domainname}
|
||||
ServerAlias www.{domainname} *.{domainname}
|
||||
SSLEngine on
|
||||
SSLCertificateFile /etc/ssl/certs/server.crt
|
||||
SSLCertificateKeyFile /etc/ssl/private/server.key
|
||||
RewriteEngine On
|
||||
RewriteCond %{HTTPS} on
|
||||
RewriteRule (.*) {domainname_redirect}%{REQUEST_URI}
|
||||
</VirtualHost>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
location ^~ /{protected_directory_path}/ {
|
||||
root {homedir}/httpdocs;
|
||||
try_files $uri $uri/ /{protected_directory_path}/index.php?$args;
|
||||
auth_basic "Restricted Area";
|
||||
auth_basic_user_file {protected_directory_credentials_file};
|
||||
location ~ ^/{protected_directory_path}/(.+\.php)$ {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/var/www/vhosts/bvidinli/deneme.com/logs/access_log /var/www/vhosts/bvidinli/deneme.com/logs/error_log /var/www/vhosts/bvidinli/ffff.com/logs/access_log /var/www/vhosts/bvidinli/ffff.com/logs/error_log /var/www/vhosts/bvidinli/ppppp.com/logs/access_log /var/www/vhosts/bvidinli/ppppp.com/logs/error_log /var/www/vhosts/bvidinli/ff/logs/access_log /var/www/vhosts/bvidinli/ff/logs/error_log /var/log/ehcp.log /var/log/apache_common_access_log {
|
||||
/var/log/ehcp.log /var/log/php_errors.log /var/log/apache_common_access_log {
|
||||
daily
|
||||
missingok
|
||||
compress
|
||||
|
|
|
@ -12,30 +12,29 @@ server {
|
|||
|
||||
root {homedir};
|
||||
index index.html index.htm index.php;
|
||||
|
||||
if ($bad_bot) { return 444; }
|
||||
if ($bad_referer) { return 403; }
|
||||
|
||||
location / {
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
|
||||
if (-f $document_root/error_page.html ) {
|
||||
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 500 501 502 503 504 505 506 507 /error_page.html;
|
||||
}
|
||||
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 500 501 502 503 504 505 506 507 /error_page.html;
|
||||
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
## Images and static content is treated different
|
||||
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml|swf)$ {
|
||||
access_log off;
|
||||
expires 30d;
|
||||
root {homedir};
|
||||
}
|
||||
|
||||
location ~ .php$ {
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME {homedir}$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear \n upload_tmp_dir={homedir}/phptmpdir \n session.save_path={homedir}/phptmpdir \n disable_functions=exec,passthru,shell_exec,system,proc_open,popen";
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear \n upload_tmp_dir={homedir}/phptmpdir \n session.save_path={homedir}/phptmpdir";
|
||||
include fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
|
||||
location /.well-known {
|
||||
auth_basic off;
|
||||
allow all; # Allow all to see content
|
||||
}
|
||||
|
||||
location ~ (apache_subdomain_template|apachetemplate|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
|
|
|
@ -13,36 +13,38 @@ server {
|
|||
error_log {homedir}/logs/error_log;
|
||||
|
||||
index index.html index.htm index.php;
|
||||
|
||||
if ($bad_bot) { return 444; }
|
||||
if ($bad_referer) { return 403; }
|
||||
|
||||
location / {
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
|
||||
if (-f $document_root/error_page.html ) {
|
||||
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 500 501 502 503 504 505 506 507 /error_page.html;
|
||||
}
|
||||
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 500 501 502 503 504 505 506 507 /error_page.html;
|
||||
|
||||
{root_password_protected_dirs}
|
||||
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
|
||||
location ~ \.php$ {
|
||||
root {homedir}/httpdocs;
|
||||
include fastcgi_params;
|
||||
root {homedir}/httpdocs;
|
||||
include fastcgi_params;
|
||||
try_files $uri = 404;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear \n upload_tmp_dir={homedir}/phptmpdir \n session.save_path={homedir}/phptmpdir \n disable_functions=exec,passthru,shell_exec,system,proc_open,popen";
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear \n upload_tmp_dir={homedir}/phptmpdir \n session.save_path={homedir}/phptmpdir";
|
||||
fastcgi_read_timeout 300;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
|
||||
location /phpmyadmin {
|
||||
location /phpmyadmin/ {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
|
@ -57,18 +59,14 @@ server {
|
|||
}
|
||||
}
|
||||
|
||||
location /phpMyAdmin {
|
||||
rewrite ^/* /phpmyadmin last;
|
||||
}
|
||||
|
||||
location /webmail2 {
|
||||
location /webmail2/ {
|
||||
root {ehcpdir}/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/webmail2/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root {ehcpdir}/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2 \n upload_tmp_dir={ehcpdir}/webmail2/data \n session.save_path={ehcpdir}/webmail2/data";
|
||||
|
@ -80,19 +78,15 @@ server {
|
|||
root {ehcpdir}/;
|
||||
}
|
||||
}
|
||||
|
||||
location /webmail {
|
||||
rewrite ^/* /roundcube last;
|
||||
}
|
||||
|
||||
location /ehcp {
|
||||
|
||||
location /ehcp/ {
|
||||
root /var/www/new/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/ehcp/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /var/www/new/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={ehcpdir}/:/var/www/php_sessions:/tmp \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
|
@ -103,7 +97,7 @@ server {
|
|||
location ~* ^/ehcp/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /var/www/new/;
|
||||
}
|
||||
|
||||
|
||||
location ~ ^/ehcp/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
|
@ -121,25 +115,56 @@ server {
|
|||
}
|
||||
}
|
||||
|
||||
location /roundcube {
|
||||
location /roundcube/ {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/roundcube/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/lib/roundcube:/etc/roundcube:/usr/share:/tmp:/var/www/php_sessions:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
|
||||
|
||||
location ~* ^/roundcube/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /usr/share/;
|
||||
}
|
||||
}
|
||||
|
||||
location /.well-known {
|
||||
auth_basic off;
|
||||
allow all; # Allow all to see content
|
||||
}
|
||||
|
||||
# Alias Section
|
||||
|
||||
location = /ehcp {
|
||||
return 301 /ehcp/;
|
||||
}
|
||||
|
||||
location = /webmail2 {
|
||||
return 301 /webmail2/;
|
||||
}
|
||||
|
||||
location = /webmail {
|
||||
return 301 /roundcube/;
|
||||
}
|
||||
|
||||
location = /roundcube {
|
||||
return 301 /roundcube/;
|
||||
}
|
||||
|
||||
location = /phpMyAdmin {
|
||||
return 301 /phpmyadmin/;
|
||||
}
|
||||
|
||||
location = /phpmyadmin {
|
||||
return 301 /phpmyadmin/;
|
||||
}
|
||||
|
||||
# any files that should be avoided, may be put here:
|
||||
location ~ (apache_subdomain_template|apachetemplate|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
|
|
|
@ -1,79 +1,75 @@
|
|||
# START OF CUSTOM GLOBAL PANEL URLS Template
|
||||
server {
|
||||
listen 80;
|
||||
server_name {domainname};
|
||||
listen 80;
|
||||
server_name {domainname};
|
||||
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
|
||||
root {ehcpdir};
|
||||
index index.php;
|
||||
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
|
||||
root {ehcpdir};
|
||||
index index.php;
|
||||
|
||||
location ~ \.php$ {
|
||||
root {ehcpdir};
|
||||
include fastcgi_params;
|
||||
try_files $uri = 404;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/tmp:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
fastcgi_read_timeout 300;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root concurs with nginx's one
|
||||
#
|
||||
location ~ (apache_subdomain_template|apachetemplate$|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location / {
|
||||
location ~ ^/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.txt)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.log)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.sh)$ {
|
||||
return 403;
|
||||
}
|
||||
}
|
||||
|
||||
location /phpmyadmin {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 600;
|
||||
}
|
||||
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /usr/share/;
|
||||
}
|
||||
}
|
||||
|
||||
location /phpMyAdmin {
|
||||
rewrite ^/* /phpmyadmin last;
|
||||
# deny access to .htaccess files, if Apache's document root concurs with nginx's one
|
||||
#
|
||||
location ~ (apache_subdomain_template|apachetemplate$|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location /webmail2 {
|
||||
location / {
|
||||
location ~ ^/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.txt)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.log)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.sh)$ {
|
||||
return 403;
|
||||
}
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
root {ehcpdir};
|
||||
include fastcgi_params;
|
||||
try_files $uri = 404;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/tmp:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
fastcgi_read_timeout 300;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
|
||||
location /phpmyadmin/ {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 600;
|
||||
}
|
||||
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /usr/share/;
|
||||
}
|
||||
}
|
||||
|
||||
location /webmail2/ {
|
||||
root {ehcpdir}/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/webmail2/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root {ehcpdir}/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2 \n upload_tmp_dir={ehcpdir}/webmail2/data \n session.save_path={ehcpdir}/webmail2/data";
|
||||
|
@ -85,19 +81,15 @@ server {
|
|||
root {ehcpdir}/;
|
||||
}
|
||||
}
|
||||
|
||||
location /webmail {
|
||||
rewrite ^/* /roundcube last;
|
||||
}
|
||||
|
||||
location /roundcube {
|
||||
location /roundcube/ {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/roundcube/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/lib/roundcube:/etc/roundcube:/usr/share:/tmp:/var/www/php_sessions:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
|
@ -109,6 +101,46 @@ server {
|
|||
root /usr/share/;
|
||||
}
|
||||
}
|
||||
|
||||
location /extplorer/ {
|
||||
root {ehcpdir}/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/extplorer/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root {ehcpdir}/;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/www:/tmp:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
}
|
||||
|
||||
location /webmail2 {
|
||||
return 301 /webmail2/;
|
||||
}
|
||||
|
||||
location /webmail {
|
||||
return 301 /roundcube/;
|
||||
}
|
||||
|
||||
location /roundcube {
|
||||
return 301 /roundcube/;
|
||||
}
|
||||
|
||||
location /phpMyAdmin {
|
||||
return 301 /phpmyadmin/;
|
||||
}
|
||||
|
||||
location = /phpmyadmin {
|
||||
return 301 /phpmyadmin/;
|
||||
}
|
||||
|
||||
location = /extplorer {
|
||||
return 301 /extplorer/;
|
||||
}
|
||||
}
|
||||
# END OF CUSTOM GLOBAL PANEL URLS Template
|
||||
|
||||
|
|
|
@ -2,85 +2,85 @@
|
|||
# nginx default server config file
|
||||
|
||||
server {
|
||||
listen 80 default;
|
||||
server_name _;
|
||||
listen 80 default;
|
||||
server_name _;
|
||||
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
|
||||
root /var/www/new;
|
||||
index index.html index.htm index.php;
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
|
||||
root /var/www/new;
|
||||
index index.html index.htm index.php;
|
||||
|
||||
# Set this to off if you're hosting more than one site
|
||||
server_name_in_redirect off;
|
||||
# Set this to off if you're hosting more than one site
|
||||
server_name_in_redirect off;
|
||||
|
||||
# SEO friendly URLs for Wordpress
|
||||
#
|
||||
#location /wordpress/ {
|
||||
# if (!-e $request_filename) {
|
||||
# rewrite ^(.*)$ /wordpress/index.php?q=$1 last;
|
||||
# }
|
||||
#}
|
||||
# SEO friendly URLs for Wordpress
|
||||
#
|
||||
#location /wordpress/ {
|
||||
# if (!-e $request_filename) {
|
||||
# rewrite ^(.*)$ /wordpress/index.php?q=$1 last;
|
||||
# }
|
||||
#}
|
||||
|
||||
#error_page 404 /404.html;
|
||||
#error_page 404 /404.html;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /var/www/nginx-default;
|
||||
}
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /var/www/nginx-default;
|
||||
}
|
||||
|
||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
||||
#
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME /var/www/new$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/www:/tmp:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
||||
#
|
||||
location ~ \.php$ {
|
||||
try_files $uri = 404;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME /var/www/new$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/www:/tmp:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root concurs with nginx's one
|
||||
#
|
||||
location ~ (apache_subdomain_template|apachetemplate$|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location /ehcp {
|
||||
location ~ ^/ehcp/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.txt)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.log)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.sh)$ {
|
||||
return 403;
|
||||
}
|
||||
# deny access to .htaccess files, if Apache's document root concurs with nginx's one
|
||||
#
|
||||
location ~ (apache_subdomain_template|apachetemplate$|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location /ehcp {
|
||||
location ~ ^/ehcp/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
|
||||
location /phpmyadmin {
|
||||
location ~ ^/ehcp/(.+\.txt)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.log)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.sh)$ {
|
||||
return 403;
|
||||
}
|
||||
}
|
||||
|
||||
location /phpmyadmin {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 600;
|
||||
}
|
||||
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /usr/share/;
|
||||
}
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 600;
|
||||
}
|
||||
|
||||
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /usr/share/;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ types {
|
|||
image/x-ms-bmp bmp;
|
||||
image/svg+xml svg svgz;
|
||||
|
||||
application/csv csv;
|
||||
application/java-archive jar war ear;
|
||||
application/json json;
|
||||
application/mac-binhex40 hqx;
|
||||
|
@ -67,6 +68,7 @@ types {
|
|||
application/octet-stream iso img;
|
||||
application/octet-stream msi msp msm;
|
||||
application/ogg ogx;
|
||||
application/so so;
|
||||
|
||||
audio/midi mid midi kar;
|
||||
audio/mpeg mpga mpega mp2 mp3 m4a;
|
||||
|
|
|
@ -4,48 +4,57 @@
|
|||
user {wwwuser} {wwwgroup};
|
||||
worker_processes 4;
|
||||
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
|
||||
pid /var/run/nginx.pid;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
server_names_hash_bucket_size 4096;
|
||||
variables_hash_max_size 4096;
|
||||
variables_hash_bucket_size 4096;
|
||||
types_hash_max_size 4096;
|
||||
limit_req_zone $binary_remote_addr zone=one:20m rate=10r/s;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
#default_type application/octet-stream;
|
||||
default_type text/html;
|
||||
|
||||
log_format combined_host '$remote_addr - $remote_user [$time_local] '
|
||||
include /etc/nginx/mime.types;
|
||||
#default_type application/octet-stream;
|
||||
default_type text/html;
|
||||
|
||||
log_format combined_host '$remote_addr - $remote_user [$time_local] '
|
||||
'"$host" "$request" $status $body_bytes_sent '
|
||||
'"$http_referer" "$http_user_agent"';
|
||||
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
#keepalive_timeout 0;
|
||||
keepalive_timeout 3;
|
||||
tcp_nodelay on;
|
||||
#keepalive_timeout 0;
|
||||
keepalive_timeout 3;
|
||||
tcp_nodelay on;
|
||||
|
||||
gzip on;
|
||||
gzip_comp_level 2;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
gzip on;
|
||||
gzip_comp_level 2;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
# Nginx default value was 1 MB and therefore all uploads exceeding 1 MB was
|
||||
# getting "413 Request Entity Too Large" error.Script default is 64 MB.
|
||||
# Remember to change the settings for upload size in php.ini as well.
|
||||
client_max_body_size 64m;
|
||||
# Nginx default value was 1 MB and therefore all uploads exceeding 1 MB was
|
||||
# getting "413 Request Entity Too Large" error.Script default is 64 MB.
|
||||
# Remember to change the settings for upload size in php.ini as well.
|
||||
client_max_body_size 1024m;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
include /var/www/new/ehcp/apachehcp.conf;
|
||||
include /var/www/new/ehcp/apachehcp_subdomains.conf;
|
||||
include /var/www/new/ehcp/apachehcp_globalpanelurls.conf;
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
include /var/www/new/ehcp/apachehcp.conf;
|
||||
include /var/www/new/ehcp/apachehcp_subdomains.conf;
|
||||
include /var/www/new/ehcp/apachehcp_globalpanelurls.conf;
|
||||
|
||||
##########################
|
||||
# Nginx Bad Bot Blocker #
|
||||
##########################
|
||||
include nginx-badbot-blocker/blacklist.conf;
|
||||
include nginx-badbot-blocker/blockips.conf;
|
||||
}
|
||||
|
|
|
@ -12,30 +12,29 @@ server {
|
|||
|
||||
root {homedir};
|
||||
index index.html index.htm index.php;
|
||||
|
||||
if ($bad_bot) { return 444; }
|
||||
if ($bad_referer) { return 403; }
|
||||
|
||||
location / {
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
|
||||
if (-f $document_root/error_page.html ) {
|
||||
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 500 501 502 503 504 505 506 507 /error_page.html;
|
||||
}
|
||||
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 500 501 502 503 504 505 506 507 /error_page.html;
|
||||
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
## Images and static content is treated different
|
||||
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml|swf)$ {
|
||||
access_log off;
|
||||
expires 30d;
|
||||
root {homedir};
|
||||
}
|
||||
|
||||
location ~ .php$ {
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME {homedir}$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear \n upload_tmp_dir={homedir}/phptmpdir \n session.save_path={homedir}/phptmpdir \n disable_functions=exec,passthru,shell_exec,system,proc_open,popen";
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear \n upload_tmp_dir={homedir}/phptmpdir \n session.save_path={homedir}/phptmpdir";
|
||||
include fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
|
||||
location /.well-known {
|
||||
auth_basic off;
|
||||
allow all; # Allow all to see content
|
||||
}
|
||||
|
||||
location ~ (apache_subdomain_template|apachetemplate|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
|
|
|
@ -13,16 +13,18 @@ server {
|
|||
error_log {homedir}/logs/error_log;
|
||||
|
||||
index index.html index.htm index.php;
|
||||
|
||||
if ($bad_bot) { return 444; }
|
||||
if ($bad_referer) { return 403; }
|
||||
|
||||
location / {
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
|
||||
if (-f $document_root/error_page.html ) {
|
||||
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 500 501 502 503 504 505 506 507 /error_page.html;
|
||||
}
|
||||
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 500 501 502 503 504 505 506 507 /error_page.html;
|
||||
|
||||
{root_password_protected_dirs}
|
||||
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
|
||||
location ~ \.php$ {
|
||||
root {homedir}/httpdocs;
|
||||
include fastcgi_params;
|
||||
|
@ -30,18 +32,18 @@ server {
|
|||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear \n upload_tmp_dir={homedir}/phptmpdir \n session.save_path={homedir}/phptmpdir \n disable_functions=exec,passthru,shell_exec,system,proc_open,popen";
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear \n upload_tmp_dir={homedir}/phptmpdir \n session.save_path={homedir}/phptmpdir";
|
||||
fastcgi_read_timeout 300;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
|
||||
location /phpmyadmin {
|
||||
location /phpmyadmin/ {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
|
@ -55,17 +57,13 @@ server {
|
|||
}
|
||||
}
|
||||
|
||||
location /phpMyAdmin {
|
||||
rewrite ^/* /phpmyadmin last;
|
||||
}
|
||||
|
||||
location /webmail2 {
|
||||
location /webmail2/ {
|
||||
root {ehcpdir}/;
|
||||
index index.php index.html index.htm;
|
||||
location ~ ^/webmail2/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root {ehcpdir}/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2 \n upload_tmp_dir={ehcpdir}/webmail2/data \n session.save_path={ehcpdir}/webmail2/data";
|
||||
|
@ -78,17 +76,13 @@ server {
|
|||
}
|
||||
}
|
||||
|
||||
location /webmail {
|
||||
rewrite ^/* /roundcube last;
|
||||
}
|
||||
|
||||
location /ehcp {
|
||||
location /ehcp/ {
|
||||
root /var/www/new/;
|
||||
index index.php index.html index.htm;
|
||||
location ~ ^/ehcp/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /var/www/new/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={ehcpdir}/:/var/www/php_sessions:/tmp \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
|
@ -99,11 +93,11 @@ server {
|
|||
location ~* ^/ehcp/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /var/www/new/;
|
||||
}
|
||||
|
||||
|
||||
location ~ ^/ehcp/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
|
||||
|
||||
location ~ ^/ehcp/(.+\.txt)$ {
|
||||
return 403;
|
||||
}
|
||||
|
@ -117,13 +111,13 @@ server {
|
|||
}
|
||||
}
|
||||
|
||||
location /roundcube {
|
||||
location /roundcube/ {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
location ~ ^/roundcube/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/lib/roundcube:/etc/roundcube:/usr/share:/tmp:/var/www/php_sessions:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
|
@ -134,6 +128,37 @@ server {
|
|||
root /usr/share/;
|
||||
}
|
||||
}
|
||||
|
||||
location /.well-known {
|
||||
auth_basic off;
|
||||
allow all; # Allow all to see content
|
||||
}
|
||||
|
||||
# Alias Section
|
||||
|
||||
location = /ehcp {
|
||||
return 301 /ehcp/;
|
||||
}
|
||||
|
||||
location = /webmail2 {
|
||||
return 301 /webmail2/;
|
||||
}
|
||||
|
||||
location = /webmail {
|
||||
return 301 /roundcube/;
|
||||
}
|
||||
|
||||
location = /roundcube {
|
||||
return 301 /roundcube/;
|
||||
}
|
||||
|
||||
location = /phpMyAdmin {
|
||||
return 301 /phpmyadmin/;
|
||||
}
|
||||
|
||||
location = /phpmyadmin {
|
||||
return 301 /phpmyadmin/;
|
||||
}
|
||||
|
||||
# any files that should be avoided, may be put here:
|
||||
location ~ (apache_subdomain_template|apachetemplate|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
|
|
|
@ -1,79 +1,75 @@
|
|||
# START OF CUSTOM GLOBAL PANEL URLS Template
|
||||
server {
|
||||
listen 80;
|
||||
server_name {domainname};
|
||||
listen 80;
|
||||
server_name {domainname};
|
||||
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
|
||||
root {ehcpdir};
|
||||
index index.php;
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
|
||||
location ~ \.php$ {
|
||||
root {ehcpdir};
|
||||
include fastcgi_params;
|
||||
try_files $uri = 404;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/tmp:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
fastcgi_read_timeout 300;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
root {ehcpdir};
|
||||
index index.php;
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root concurs with nginx's one
|
||||
#
|
||||
location ~ (apache_subdomain_template|apachetemplate$|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location / {
|
||||
location ~ ^/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.txt)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.log)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.sh)$ {
|
||||
return 403;
|
||||
}
|
||||
}
|
||||
|
||||
location /phpmyadmin {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 600;
|
||||
}
|
||||
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /usr/share/;
|
||||
}
|
||||
}
|
||||
|
||||
location /phpMyAdmin {
|
||||
rewrite ^/* /phpmyadmin last;
|
||||
# deny access to .htaccess files, if Apache's document root concurs with nginx's one
|
||||
#
|
||||
location ~ (apache_subdomain_template|apachetemplate$|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location /webmail2 {
|
||||
location / {
|
||||
location ~ ^/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.txt)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.log)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.sh)$ {
|
||||
return 403;
|
||||
}
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
root {ehcpdir};
|
||||
include fastcgi_params;
|
||||
try_files $uri = 404;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/tmp:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
fastcgi_read_timeout 300;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
|
||||
location /phpmyadmin/ {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 600;
|
||||
}
|
||||
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /usr/share/;
|
||||
}
|
||||
}
|
||||
|
||||
location /webmail2/ {
|
||||
root {ehcpdir}/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/webmail2/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root {ehcpdir}/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2 \n upload_tmp_dir={ehcpdir}/webmail2/data \n session.save_path={ehcpdir}/webmail2/data";
|
||||
|
@ -85,19 +81,15 @@ server {
|
|||
root {ehcpdir}/;
|
||||
}
|
||||
}
|
||||
|
||||
location /webmail {
|
||||
rewrite ^/* /roundcube last;
|
||||
}
|
||||
|
||||
location /roundcube {
|
||||
location /roundcube/ {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/roundcube/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/lib/roundcube:/etc/roundcube:/usr/share:/tmp:/var/www/php_sessions:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
|
@ -109,6 +101,48 @@ server {
|
|||
root /usr/share/;
|
||||
}
|
||||
}
|
||||
|
||||
location /extplorer/ {
|
||||
root {ehcpdir}/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/extplorer/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root {ehcpdir}/;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/www:/tmp:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
}
|
||||
|
||||
# Alias
|
||||
|
||||
location = /webmail2 {
|
||||
return 301 /webmail2/;
|
||||
}
|
||||
|
||||
location = /webmail {
|
||||
return 301 /roundcube/;
|
||||
}
|
||||
|
||||
location = /roundcube {
|
||||
return 301 /roundcube/;
|
||||
}
|
||||
|
||||
location = /phpMyAdmin {
|
||||
return 301 /phpmyadmin/;
|
||||
}
|
||||
|
||||
location = /phpmyadmin {
|
||||
return 301 /phpmyadmin/;
|
||||
}
|
||||
|
||||
location = /extplorer {
|
||||
return 301 /extplorer/;
|
||||
}
|
||||
}
|
||||
# END OF CUSTOM GLOBAL PANEL URLS Template
|
||||
|
||||
|
|
|
@ -2,85 +2,85 @@
|
|||
# nginx default server config file
|
||||
|
||||
server {
|
||||
listen 80 default;
|
||||
server_name _;
|
||||
listen 80 default;
|
||||
server_name _;
|
||||
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
|
||||
root /var/www/new;
|
||||
index index.html index.htm index.php;
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
|
||||
# Set this to off if you're hosting more than one site
|
||||
server_name_in_redirect off;
|
||||
root /var/www/new;
|
||||
index index.html index.htm index.php;
|
||||
|
||||
# SEO friendly URLs for Wordpress
|
||||
#
|
||||
#location /wordpress/ {
|
||||
# if (!-e $request_filename) {
|
||||
# rewrite ^(.*)$ /wordpress/index.php?q=$1 last;
|
||||
# }
|
||||
#}
|
||||
# Set this to off if you're hosting more than one site
|
||||
server_name_in_redirect off;
|
||||
|
||||
#error_page 404 /404.html;
|
||||
# SEO friendly URLs for Wordpress
|
||||
#
|
||||
#location /wordpress/ {
|
||||
# if (!-e $request_filename) {
|
||||
# rewrite ^(.*)$ /wordpress/index.php?q=$1 last;
|
||||
# }
|
||||
#}
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /var/www/nginx-default;
|
||||
}
|
||||
#error_page 404 /404.html;
|
||||
|
||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
||||
#
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME /var/www/new$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/www:/tmp:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /var/www/nginx-default;
|
||||
}
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root concurs with nginx's one
|
||||
#
|
||||
location ~ (apache_subdomain_template|apachetemplate$|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location /ehcp {
|
||||
location ~ ^/ehcp/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.txt)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.log)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.sh)$ {
|
||||
return 403;
|
||||
}
|
||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
||||
#
|
||||
location ~ \.php$ {
|
||||
try_files $uri = 404;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME /var/www/new$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/www:/tmp:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root concurs with nginx's one
|
||||
#
|
||||
location ~ (apache_subdomain_template|apachetemplate$|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location /ehcp {
|
||||
location ~ ^/ehcp/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
|
||||
location /phpmyadmin {
|
||||
location ~ ^/ehcp/(.+\.txt)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.log)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.sh)$ {
|
||||
return 403;
|
||||
}
|
||||
}
|
||||
|
||||
location /phpmyadmin {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 600;
|
||||
}
|
||||
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /usr/share/;
|
||||
}
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 600;
|
||||
}
|
||||
|
||||
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /usr/share/;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ types {
|
|||
image/x-ms-bmp bmp;
|
||||
image/svg+xml svg svgz;
|
||||
|
||||
application/csv csv;
|
||||
application/java-archive jar war ear;
|
||||
application/json json;
|
||||
application/mac-binhex40 hqx;
|
||||
|
@ -67,6 +68,7 @@ types {
|
|||
application/octet-stream iso img;
|
||||
application/octet-stream msi msp msm;
|
||||
application/ogg ogx;
|
||||
application/so so;
|
||||
|
||||
audio/midi mid midi kar;
|
||||
audio/mpeg mpga mpega mp2 mp3 m4a;
|
||||
|
|
|
@ -4,48 +4,57 @@
|
|||
user {wwwuser} {wwwgroup};
|
||||
worker_processes 4;
|
||||
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
|
||||
pid /var/run/nginx.pid;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
server_names_hash_bucket_size 4096;
|
||||
variables_hash_max_size 4096;
|
||||
variables_hash_bucket_size 4096;
|
||||
types_hash_max_size 4096;
|
||||
limit_req_zone $binary_remote_addr zone=one:20m rate=10r/s;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
#default_type application/octet-stream;
|
||||
default_type text/html;
|
||||
|
||||
log_format combined_host '$remote_addr - $remote_user [$time_local] '
|
||||
include /etc/nginx/mime.types;
|
||||
#default_type application/octet-stream;
|
||||
default_type text/html;
|
||||
|
||||
log_format combined_host '$remote_addr - $remote_user [$time_local] '
|
||||
'"$host" "$request" $status $body_bytes_sent '
|
||||
'"$http_referer" "$http_user_agent"';
|
||||
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
#keepalive_timeout 0;
|
||||
keepalive_timeout 3;
|
||||
tcp_nodelay on;
|
||||
#keepalive_timeout 0;
|
||||
keepalive_timeout 3;
|
||||
tcp_nodelay on;
|
||||
|
||||
gzip on;
|
||||
gzip_comp_level 2;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
gzip on;
|
||||
gzip_comp_level 2;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
# Nginx default value was 1 MB and therefore all uploads exceeding 1 MB was
|
||||
# getting "413 Request Entity Too Large" error.Script default is 64 MB.
|
||||
# Remember to change the settings for upload size in php.ini as well.
|
||||
client_max_body_size 64m;
|
||||
# Nginx default value was 1 MB and therefore all uploads exceeding 1 MB was
|
||||
# getting "413 Request Entity Too Large" error.Script default is 64 MB.
|
||||
# Remember to change the settings for upload size in php.ini as well.
|
||||
client_max_body_size 1024m;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
include /var/www/new/ehcp/apachehcp.conf;
|
||||
include /var/www/new/ehcp/apachehcp_subdomains.conf;
|
||||
include /var/www/new/ehcp/apachehcp_globalpanelurls.conf;
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
include /var/www/new/ehcp/apachehcp.conf;
|
||||
include /var/www/new/ehcp/apachehcp_subdomains.conf;
|
||||
include /var/www/new/ehcp/apachehcp_globalpanelurls.conf;
|
||||
|
||||
##########################
|
||||
# Nginx Bad Bot Blocker #
|
||||
##########################
|
||||
include nginx-badbot-blocker/blacklist.conf;
|
||||
include nginx-badbot-blocker/blockips.conf;
|
||||
}
|
||||
|
|
|
@ -12,30 +12,29 @@ server {
|
|||
|
||||
root {homedir};
|
||||
index index.html index.htm index.php;
|
||||
|
||||
if ($bad_bot) { return 444; }
|
||||
if ($bad_referer) { return 403; }
|
||||
|
||||
location / {
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
|
||||
if (-f $document_root/error_page.html ) {
|
||||
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 500 501 502 503 504 505 506 507 /error_page.html;
|
||||
}
|
||||
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 500 501 502 503 504 505 506 507 /error_page.html;
|
||||
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
## Images and static content is treated different
|
||||
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml|swf)$ {
|
||||
access_log off;
|
||||
expires 30d;
|
||||
root {homedir};
|
||||
}
|
||||
|
||||
location ~ .php$ {
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME {homedir}$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear \n upload_tmp_dir={homedir}/phptmpdir \n session.save_path={homedir}/phptmpdir \n disable_functions=exec,passthru,shell_exec,system,proc_open,popen";
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear \n upload_tmp_dir={homedir}/phptmpdir \n session.save_path={homedir}/phptmpdir";
|
||||
include fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
|
||||
location /.well-known {
|
||||
auth_basic off;
|
||||
allow all; # Allow all to see content
|
||||
}
|
||||
|
||||
location ~ (apache_subdomain_template|apachetemplate|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
|
@ -58,30 +57,29 @@ server {
|
|||
|
||||
root {homedir};
|
||||
index index.html index.htm index.php;
|
||||
|
||||
if ($bad_bot) { return 444; }
|
||||
if ($bad_referer) { return 403; }
|
||||
|
||||
location / {
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
|
||||
if (-f $document_root/error_page.html ) {
|
||||
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 500 501 502 503 504 505 506 507 /error_page.html;
|
||||
}
|
||||
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 500 501 502 503 504 505 506 507 /error_page.html;
|
||||
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
## Images and static content is treated different
|
||||
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml|swf)$ {
|
||||
access_log off;
|
||||
expires 30d;
|
||||
root {homedir};
|
||||
}
|
||||
|
||||
location ~ .php$ {
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME {homedir}$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear \n upload_tmp_dir={homedir}/phptmpdir \n session.save_path={homedir}/phptmpdir \n disable_functions=exec,passthru,shell_exec,system,proc_open,popen";
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear \n upload_tmp_dir={homedir}/phptmpdir \n session.save_path={homedir}/phptmpdir";
|
||||
include fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
|
||||
location /.well-known {
|
||||
auth_basic off;
|
||||
allow all; # Allow all to see content
|
||||
}
|
||||
|
||||
location ~ (apache_subdomain_template|apachetemplate|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
|
|
|
@ -13,16 +13,18 @@ server {
|
|||
error_log {homedir}/logs/error_log;
|
||||
|
||||
index index.html index.htm index.php;
|
||||
|
||||
if ($bad_bot) { return 444; }
|
||||
if ($bad_referer) { return 403; }
|
||||
|
||||
location / {
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
|
||||
if (-f $document_root/error_page.html ) {
|
||||
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 500 501 502 503 504 505 506 507 /error_page.html;
|
||||
}
|
||||
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 500 501 502 503 504 505 506 507 /error_page.html;
|
||||
|
||||
{root_password_protected_dirs}
|
||||
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
|
||||
location ~ \.php$ {
|
||||
root {homedir}/httpdocs;
|
||||
include fastcgi_params;
|
||||
|
@ -30,19 +32,19 @@ server {
|
|||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear \n upload_tmp_dir={homedir}/phptmpdir \n session.save_path={homedir}/phptmpdir \n disable_functions=exec,passthru,shell_exec,system,proc_open,popen";
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear \n upload_tmp_dir={homedir}/phptmpdir \n session.save_path={homedir}/phptmpdir";
|
||||
fastcgi_read_timeout 300;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
}
|
||||
|
||||
location /phpmyadmin {
|
||||
location /phpmyadmin/ {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
|
@ -57,18 +59,14 @@ server {
|
|||
}
|
||||
}
|
||||
|
||||
location /phpMyAdmin {
|
||||
rewrite ^/* /phpmyadmin last;
|
||||
}
|
||||
|
||||
location /webmail2 {
|
||||
location /webmail2/ {
|
||||
root {ehcpdir}/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/webmail2/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root {ehcpdir}/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2 \n upload_tmp_dir={ehcpdir}/webmail2/data \n session.save_path={ehcpdir}/webmail2/data";
|
||||
|
@ -81,18 +79,14 @@ server {
|
|||
}
|
||||
}
|
||||
|
||||
location /webmail {
|
||||
rewrite ^/* /roundcube last;
|
||||
}
|
||||
|
||||
location /ehcp {
|
||||
location /ehcp/ {
|
||||
root /var/www/new/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/ehcp/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /var/www/new/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={ehcpdir}/:/var/www/php_sessions:/tmp \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
|
@ -103,11 +97,11 @@ server {
|
|||
location ~* ^/ehcp/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /var/www/new/;
|
||||
}
|
||||
|
||||
|
||||
location ~ ^/ehcp/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
|
||||
|
||||
location ~ ^/ehcp/(.+\.txt)$ {
|
||||
return 403;
|
||||
}
|
||||
|
@ -121,14 +115,14 @@ server {
|
|||
}
|
||||
}
|
||||
|
||||
location /roundcube {
|
||||
location /roundcube/ {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/roundcube/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/lib/roundcube:/etc/roundcube:/usr/share:/tmp:/var/www/php_sessions:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
|
@ -140,6 +134,37 @@ server {
|
|||
root /usr/share/;
|
||||
}
|
||||
}
|
||||
|
||||
location /.well-known {
|
||||
auth_basic off;
|
||||
allow all; # Allow all to see content
|
||||
}
|
||||
|
||||
# Alias Section
|
||||
|
||||
location = /ehcp {
|
||||
return 301 /ehcp/;
|
||||
}
|
||||
|
||||
location = /webmail2 {
|
||||
return 301 /webmail2/;
|
||||
}
|
||||
|
||||
location = /webmail {
|
||||
return 301 /roundcube/;
|
||||
}
|
||||
|
||||
location = /roundcube {
|
||||
return 301 /roundcube/;
|
||||
}
|
||||
|
||||
location = /phpMyAdmin {
|
||||
return 301 /phpmyadmin/;
|
||||
}
|
||||
|
||||
location = /phpmyadmin {
|
||||
return 301 /phpmyadmin/;
|
||||
}
|
||||
|
||||
# any files that should be avoided, may be put here:
|
||||
location ~ (apache_subdomain_template|apachetemplate|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
|
@ -169,16 +194,18 @@ server {
|
|||
error_log {homedir}/logs/error_log;
|
||||
|
||||
index index.html index.htm index.php;
|
||||
|
||||
if ($bad_bot) { return 444; }
|
||||
if ($bad_referer) { return 403; }
|
||||
|
||||
location / {
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
|
||||
if (-f $document_root/error_page.html ) {
|
||||
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 500 501 502 503 504 505 506 507 /error_page.html;
|
||||
}
|
||||
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 500 501 502 503 504 505 506 507 /error_page.html;
|
||||
|
||||
{root_password_protected_dirs}
|
||||
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
|
||||
location ~ \.php$ {
|
||||
root {homedir}/httpdocs;
|
||||
include fastcgi_params;
|
||||
|
@ -186,19 +213,19 @@ server {
|
|||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear \n upload_tmp_dir={homedir}/phptmpdir \n session.save_path={homedir}/phptmpdir \n disable_functions=exec,passthru,shell_exec,system,proc_open,popen";
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear \n upload_tmp_dir={homedir}/phptmpdir \n session.save_path={homedir}/phptmpdir";
|
||||
fastcgi_read_timeout 300;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
|
||||
location /phpmyadmin {
|
||||
location /phpmyadmin/ {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
|
@ -213,18 +240,14 @@ server {
|
|||
}
|
||||
}
|
||||
|
||||
location /phpMyAdmin {
|
||||
rewrite ^/* /phpmyadmin last;
|
||||
}
|
||||
|
||||
location /webmail2 {
|
||||
location /webmail2/ {
|
||||
root {ehcpdir}/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/webmail2/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root {ehcpdir}/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2 \n upload_tmp_dir={ehcpdir}/webmail2/data \n session.save_path={ehcpdir}/webmail2/data";
|
||||
|
@ -237,18 +260,14 @@ server {
|
|||
}
|
||||
}
|
||||
|
||||
location /webmail {
|
||||
rewrite ^/* /roundcube last;
|
||||
}
|
||||
|
||||
location /ehcp {
|
||||
location /ehcp/ {
|
||||
root /var/www/new/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/ehcp/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /var/www/new/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={ehcpdir}/:/var/www/php_sessions:/tmp \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
|
@ -259,11 +278,11 @@ server {
|
|||
location ~* ^/ehcp/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /var/www/new/;
|
||||
}
|
||||
|
||||
|
||||
location ~ ^/ehcp/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
|
||||
|
||||
location ~ ^/ehcp/(.+\.txt)$ {
|
||||
return 403;
|
||||
}
|
||||
|
@ -277,14 +296,14 @@ server {
|
|||
}
|
||||
}
|
||||
|
||||
location /roundcube {
|
||||
location /roundcube/ {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/roundcube/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/lib/roundcube:/etc/roundcube:/usr/share:/tmp:/var/www/php_sessions:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
|
@ -297,6 +316,37 @@ server {
|
|||
}
|
||||
}
|
||||
|
||||
location /.well-known {
|
||||
auth_basic off;
|
||||
allow all; # Allow all to see content
|
||||
}
|
||||
|
||||
# Alias Section
|
||||
|
||||
location = /ehcp {
|
||||
return 301 /ehcp/;
|
||||
}
|
||||
|
||||
location = /webmail2 {
|
||||
return 301 /webmail2/;
|
||||
}
|
||||
|
||||
location = /webmail {
|
||||
return 301 /roundcube/;
|
||||
}
|
||||
|
||||
location = /roundcube {
|
||||
return 301 /roundcube/;
|
||||
}
|
||||
|
||||
location = /phpMyAdmin {
|
||||
return 301 /phpmyadmin/;
|
||||
}
|
||||
|
||||
location = /phpmyadmin {
|
||||
return 301 /phpmyadmin/;
|
||||
}
|
||||
|
||||
# any files that should be avoided, may be put here:
|
||||
location ~ (apache_subdomain_template|apachetemplate|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
|
|
|
@ -10,85 +10,81 @@ server {
|
|||
# FOR SSL CONFIG
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name {domainname};
|
||||
listen 443 ssl;
|
||||
server_name {domainname};
|
||||
|
||||
ssl_certificate {ssl_cert_path};
|
||||
ssl_certificate_key {ssl_cert_key_path};
|
||||
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
ssl_certificate {ssl_cert_path};
|
||||
ssl_certificate_key {ssl_cert_key_path};
|
||||
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
|
||||
root {ehcpdir};
|
||||
index index.php;
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
|
||||
location ~ \.php$ {
|
||||
root {ehcpdir};
|
||||
include fastcgi_params;
|
||||
try_files $uri = 404;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/tmp:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
fastcgi_read_timeout 300;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
root {ehcpdir};
|
||||
index index.php;
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root concurs with nginx's one
|
||||
#
|
||||
location ~ (apache_subdomain_template|apachetemplate$|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location / {
|
||||
location ~ ^/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.txt)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.log)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.sh)$ {
|
||||
return 403;
|
||||
}
|
||||
# deny access to .htaccess files, if Apache's document root concurs with nginx's one
|
||||
#
|
||||
location ~ (apache_subdomain_template|apachetemplate$|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location / {
|
||||
location ~ ^/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
|
||||
location /phpmyadmin {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 600;
|
||||
}
|
||||
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /usr/share/;
|
||||
}
|
||||
location ~ ^/(.+\.txt)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.log)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.sh)$ {
|
||||
return 403;
|
||||
}
|
||||
}
|
||||
|
||||
location /phpMyAdmin {
|
||||
rewrite ^/* /phpmyadmin last;
|
||||
location ~ \.php$ {
|
||||
root {ehcpdir};
|
||||
include fastcgi_params;
|
||||
try_files $uri = 404;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/tmp:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
fastcgi_read_timeout 300;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
|
||||
location /phpmyadmin/ {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 600;
|
||||
}
|
||||
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /usr/share/;
|
||||
}
|
||||
}
|
||||
|
||||
location /webmail2 {
|
||||
location /webmail2/ {
|
||||
root {ehcpdir}/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/webmail2/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root {ehcpdir}/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2 \n upload_tmp_dir={ehcpdir}/webmail2/data \n session.save_path={ehcpdir}/webmail2/data";
|
||||
|
@ -100,19 +96,15 @@ server {
|
|||
root {ehcpdir}/;
|
||||
}
|
||||
}
|
||||
|
||||
location /webmail {
|
||||
rewrite ^/* /roundcube last;
|
||||
}
|
||||
|
||||
location /roundcube {
|
||||
location /roundcube/ {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/roundcube/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/lib/roundcube:/etc/roundcube:/usr/share:/tmp:/var/www/php_sessions:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
|
@ -124,6 +116,48 @@ server {
|
|||
root /usr/share/;
|
||||
}
|
||||
}
|
||||
|
||||
location /extplorer/ {
|
||||
root {ehcpdir}/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/extplorer/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root {ehcpdir}/;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/www:/tmp:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
}
|
||||
|
||||
# Alias
|
||||
|
||||
location = /webmail2 {
|
||||
return 301 /webmail2/;
|
||||
}
|
||||
|
||||
location = /webmail {
|
||||
return 301 /roundcube/;
|
||||
}
|
||||
|
||||
location = /roundcube {
|
||||
return 301 /roundcube/;
|
||||
}
|
||||
|
||||
location = /phpMyAdmin {
|
||||
return 301 /phpmyadmin/;
|
||||
}
|
||||
|
||||
location = /phpmyadmin {
|
||||
return 301 /phpmyadmin/;
|
||||
}
|
||||
|
||||
location = /extplorer {
|
||||
return 301 /extplorer/;
|
||||
}
|
||||
}
|
||||
### END OF CUSTOM GLOBAL PANEL URLS Template ###
|
||||
|
||||
|
|
|
@ -2,176 +2,179 @@
|
|||
# nginx default server config file
|
||||
|
||||
server {
|
||||
listen 80 default;
|
||||
server_name _;
|
||||
listen 80 default;
|
||||
server_name _;
|
||||
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
|
||||
root /var/www/new;
|
||||
index index.html index.htm index.php;
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
|
||||
# Set this to off if you're hosting more than one site
|
||||
server_name_in_redirect off;
|
||||
root /var/www/new;
|
||||
index index.html index.htm index.php;
|
||||
|
||||
# SEO friendly URLs for Wordpress
|
||||
#
|
||||
#location /wordpress/ {
|
||||
# if (!-e $request_filename) {
|
||||
# rewrite ^(.*)$ /wordpress/index.php?q=$1 last;
|
||||
# }
|
||||
#}
|
||||
# Set this to off if you're hosting more than one site
|
||||
server_name_in_redirect off;
|
||||
|
||||
#error_page 404 /404.html;
|
||||
# SEO friendly URLs for Wordpress
|
||||
#
|
||||
#location /wordpress/ {
|
||||
# if (!-e $request_filename) {
|
||||
# rewrite ^(.*)$ /wordpress/index.php?q=$1 last;
|
||||
# }
|
||||
#}
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /var/www/nginx-default;
|
||||
}
|
||||
#error_page 404 /404.html;
|
||||
|
||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
||||
#
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME /var/www/new$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/www:/tmp:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /var/www/nginx-default;
|
||||
}
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root concurs with nginx's one
|
||||
#
|
||||
location ~ (apache_subdomain_template|apachetemplate$|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location /ehcp {
|
||||
location ~ ^/ehcp/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.txt)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.log)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.sh)$ {
|
||||
return 403;
|
||||
}
|
||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
||||
#
|
||||
location ~ \.php$ {
|
||||
try_files $uri = 404;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME /var/www/new$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/www:/tmp:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root concurs with nginx's one
|
||||
#
|
||||
location ~ (apache_subdomain_template|apachetemplate$|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location /ehcp {
|
||||
location ~ ^/ehcp/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
|
||||
location /phpmyadmin {
|
||||
location ~ ^/ehcp/(.+\.txt)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.log)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.sh)$ {
|
||||
return 403;
|
||||
}
|
||||
}
|
||||
|
||||
location /phpmyadmin {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 600;
|
||||
}
|
||||
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /usr/share/;
|
||||
}
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 600;
|
||||
}
|
||||
|
||||
|
||||
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /usr/share/;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# For SSL CONFIG
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name _;
|
||||
|
||||
ssl_certificate /etc/ssl/certs/server.crt;
|
||||
ssl_certificate_key /etc/ssl/private/server.key;
|
||||
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
listen 443 ssl;
|
||||
server_name _;
|
||||
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
|
||||
root /var/www/new;
|
||||
index index.html index.htm index.php;
|
||||
ssl_certificate /etc/ssl/certs/server.crt;
|
||||
ssl_certificate_key /etc/ssl/private/server.key;
|
||||
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
|
||||
# Set this to off if you're hosting more than one site
|
||||
server_name_in_redirect off;
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
|
||||
# SEO friendly URLs for Wordpress
|
||||
#
|
||||
#location /wordpress/ {
|
||||
# if (!-e $request_filename) {
|
||||
# rewrite ^(.*)$ /wordpress/index.php?q=$1 last;
|
||||
# }
|
||||
#}
|
||||
root /var/www/new;
|
||||
index index.html index.htm index.php;
|
||||
|
||||
#error_page 404 /404.html;
|
||||
# Set this to off if you're hosting more than one site
|
||||
server_name_in_redirect off;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /var/www/nginx-default;
|
||||
}
|
||||
# SEO friendly URLs for Wordpress
|
||||
#
|
||||
#location /wordpress/ {
|
||||
# if (!-e $request_filename) {
|
||||
# rewrite ^(.*)$ /wordpress/index.php?q=$1 last;
|
||||
# }
|
||||
#}
|
||||
|
||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
||||
#
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME /var/www/new$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/www:/tmp:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
#error_page 404 /404.html;
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root concurs with nginx's one
|
||||
#
|
||||
location ~ (apache_subdomain_template|apachetemplate$|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
}
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /var/www/nginx-default;
|
||||
}
|
||||
|
||||
location /ehcp {
|
||||
location ~ ^/ehcp/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.txt)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.log)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.sh)$ {
|
||||
return 403;
|
||||
}
|
||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
||||
#
|
||||
location ~ \.php$ {
|
||||
try_files $uri = 404;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME /var/www/new$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/www:/tmp:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root concurs with nginx's one
|
||||
#
|
||||
location ~ (apache_subdomain_template|apachetemplate$|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location /ehcp {
|
||||
location ~ ^/ehcp/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
|
||||
location /phpmyadmin {
|
||||
location ~ ^/ehcp/(.+\.txt)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.log)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.sh)$ {
|
||||
return 403;
|
||||
}
|
||||
}
|
||||
|
||||
location /phpmyadmin {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 600;
|
||||
}
|
||||
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /usr/share/;
|
||||
}
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 600;
|
||||
}
|
||||
|
||||
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /usr/share/;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ types {
|
|||
image/x-ms-bmp bmp;
|
||||
image/svg+xml svg svgz;
|
||||
|
||||
application/csv csv;
|
||||
application/java-archive jar war ear;
|
||||
application/json json;
|
||||
application/mac-binhex40 hqx;
|
||||
|
@ -67,6 +68,7 @@ types {
|
|||
application/octet-stream iso img;
|
||||
application/octet-stream msi msp msm;
|
||||
application/ogg ogx;
|
||||
application/so so;
|
||||
|
||||
audio/midi mid midi kar;
|
||||
audio/mpeg mpga mpega mp2 mp3 m4a;
|
||||
|
|
|
@ -5,46 +5,55 @@ user {wwwuser} {wwwgroup};
|
|||
worker_processes 4;
|
||||
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
pid /var/run/nginx.pid;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
server_names_hash_bucket_size 4096;
|
||||
variables_hash_max_size 4096;
|
||||
variables_hash_bucket_size 4096;
|
||||
types_hash_max_size 4096;
|
||||
limit_req_zone $binary_remote_addr zone=one:20m rate=10r/s;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
#default_type application/octet-stream;
|
||||
default_type text/html;
|
||||
|
||||
log_format combined_host '$remote_addr - $remote_user [$time_local] '
|
||||
include /etc/nginx/mime.types;
|
||||
#default_type application/octet-stream;
|
||||
default_type text/html;
|
||||
|
||||
log_format combined_host '$remote_addr - $remote_user [$time_local] '
|
||||
'"$host" "$request" $status $body_bytes_sent '
|
||||
'"$http_referer" "$http_user_agent"';
|
||||
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
#keepalive_timeout 0;
|
||||
keepalive_timeout 3;
|
||||
tcp_nodelay on;
|
||||
#keepalive_timeout 0;
|
||||
keepalive_timeout 3;
|
||||
tcp_nodelay on;
|
||||
|
||||
gzip on;
|
||||
gzip_comp_level 2;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
gzip on;
|
||||
gzip_comp_level 2;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
# Nginx default value was 1 MB and therefore all uploads exceeding 1 MB was
|
||||
# getting "413 Request Entity Too Large" error.Script default is 64 MB.
|
||||
# Remember to change the settings for upload size in php.ini as well.
|
||||
client_max_body_size 64m;
|
||||
# Nginx default value was 1 MB and therefore all uploads exceeding 1 MB was
|
||||
# getting "413 Request Entity Too Large" error.Script default is 64 MB.
|
||||
# Remember to change the settings for upload size in php.ini as well.
|
||||
client_max_body_size 1024m;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
include /var/www/new/ehcp/apachehcp.conf;
|
||||
include /var/www/new/ehcp/apachehcp_subdomains.conf;
|
||||
include /var/www/new/ehcp/apachehcp_globalpanelurls.conf;
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
include /var/www/new/ehcp/apachehcp.conf;
|
||||
include /var/www/new/ehcp/apachehcp_subdomains.conf;
|
||||
include /var/www/new/ehcp/apachehcp_globalpanelurls.conf;
|
||||
|
||||
##########################
|
||||
# Nginx Bad Bot Blocker #
|
||||
##########################
|
||||
include nginx-badbot-blocker/blacklist.conf;
|
||||
include nginx-badbot-blocker/blockips.conf;
|
||||
}
|
||||
|
|
|
@ -14,33 +14,32 @@ server {
|
|||
access_log {homedir}/logs/access_log;
|
||||
access_log /var/log/nginx/access_log_multi.log combined_host;
|
||||
error_log {homedir}/logs/error_log;
|
||||
|
||||
|
||||
root {homedir};
|
||||
index index.html index.htm index.php;
|
||||
|
||||
if ($bad_bot) { return 444; }
|
||||
if ($bad_referer) { return 403; }
|
||||
|
||||
location / {
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
|
||||
if (-f $document_root/error_page.html ) {
|
||||
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 500 501 502 503 504 505 506 507 /error_page.html;
|
||||
}
|
||||
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 500 501 502 503 504 505 506 507 /error_page.html;
|
||||
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
## Images and static content is treated different
|
||||
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml|swf)$ {
|
||||
access_log off;
|
||||
expires 30d;
|
||||
root {homedir};
|
||||
}
|
||||
|
||||
location ~ .php$ {
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME {homedir}$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear \n upload_tmp_dir={homedir}/phptmpdir \n session.save_path={homedir}/phptmpdir \n disable_functions=exec,passthru,shell_exec,system,proc_open,popen";
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear \n upload_tmp_dir={homedir}/phptmpdir \n session.save_path={homedir}/phptmpdir";
|
||||
include fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
|
||||
location /.well-known {
|
||||
auth_basic off;
|
||||
allow all; # Allow all to see content
|
||||
}
|
||||
|
||||
location ~ (apache_subdomain_template|apachetemplate|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
|
|
|
@ -19,16 +19,18 @@ server {
|
|||
error_log {homedir}/logs/error_log;
|
||||
|
||||
index index.html index.htm index.php;
|
||||
|
||||
if ($bad_bot) { return 444; }
|
||||
if ($bad_referer) { return 403; }
|
||||
|
||||
location / {
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
|
||||
if (-f $document_root/error_page.html ) {
|
||||
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 500 501 502 503 504 505 506 507 /error_page.html;
|
||||
}
|
||||
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 495 496 497 500 501 502 503 504 505 506 507 /error_page.html;
|
||||
|
||||
{root_password_protected_dirs}
|
||||
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
|
||||
location ~ \.php$ {
|
||||
root {homedir}/httpdocs;
|
||||
include fastcgi_params;
|
||||
|
@ -36,19 +38,19 @@ server {
|
|||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear \n upload_tmp_dir={homedir}/phptmpdir \n session.save_path={homedir}/phptmpdir \n disable_functions=exec,passthru,shell_exec,system,proc_open,popen";
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={homedir}:/usr/share/php:/usr/share/pear \n upload_tmp_dir={homedir}/phptmpdir \n session.save_path={homedir}/phptmpdir";
|
||||
fastcgi_read_timeout 300;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
|
||||
location /phpmyadmin {
|
||||
location /phpmyadmin/ {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
|
@ -63,18 +65,14 @@ server {
|
|||
}
|
||||
}
|
||||
|
||||
location /phpMyAdmin {
|
||||
rewrite ^/* /phpmyadmin last;
|
||||
}
|
||||
|
||||
location /webmail2 {
|
||||
location /webmail2/ {
|
||||
root {ehcpdir}/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/webmail2/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root {ehcpdir}/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2 \n upload_tmp_dir={ehcpdir}/webmail2/data \n session.save_path={ehcpdir}/webmail2/data";
|
||||
|
@ -87,18 +85,14 @@ server {
|
|||
}
|
||||
}
|
||||
|
||||
location /webmail {
|
||||
rewrite ^/* /roundcube last;
|
||||
}
|
||||
|
||||
location /ehcp {
|
||||
location /ehcp/ {
|
||||
root /var/www/new/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/ehcp/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /var/www/new/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={ehcpdir}/:/var/www/php_sessions:/tmp \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
|
@ -109,11 +103,11 @@ server {
|
|||
location ~* ^/ehcp/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /var/www/new/;
|
||||
}
|
||||
|
||||
|
||||
location ~ ^/ehcp/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
|
||||
|
||||
location ~ ^/ehcp/(.+\.txt)$ {
|
||||
return 403;
|
||||
}
|
||||
|
@ -127,14 +121,14 @@ server {
|
|||
}
|
||||
}
|
||||
|
||||
location /roundcube {
|
||||
location /roundcube/ {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/roundcube/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/lib/roundcube:/etc/roundcube:/usr/share:/tmp:/var/www/php_sessions:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
|
@ -147,6 +141,37 @@ server {
|
|||
}
|
||||
}
|
||||
|
||||
location /.well-known {
|
||||
auth_basic off;
|
||||
allow all; # Allow all to see content
|
||||
}
|
||||
|
||||
# Alias Section
|
||||
|
||||
location = /ehcp {
|
||||
return 301 /ehcp/;
|
||||
}
|
||||
|
||||
location = /webmail2 {
|
||||
return 301 /webmail2/;
|
||||
}
|
||||
|
||||
location = /webmail {
|
||||
return 301 /roundcube/;
|
||||
}
|
||||
|
||||
location = /roundcube {
|
||||
return 301 /roundcube/;
|
||||
}
|
||||
|
||||
location = /phpMyAdmin {
|
||||
return 301 /phpmyadmin/;
|
||||
}
|
||||
|
||||
location = /phpmyadmin {
|
||||
return 301 /phpmyadmin/;
|
||||
}
|
||||
|
||||
# any files that should be avoided, may be put here:
|
||||
location ~ (apache_subdomain_template|apachetemplate|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
|
|
|
@ -1,84 +1,80 @@
|
|||
# START OF CUSTOM GLOBAL PANEL URLS Template
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name {domainname};
|
||||
listen 443 ssl;
|
||||
server_name {domainname};
|
||||
|
||||
ssl_certificate {ssl_cert_path};
|
||||
ssl_certificate_key {ssl_cert_key_path};
|
||||
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
ssl_certificate {ssl_cert_path};
|
||||
ssl_certificate_key {ssl_cert_key_path};
|
||||
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
|
||||
root {ehcpdir};
|
||||
index index.php;
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
|
||||
location ~ \.php$ {
|
||||
root {ehcpdir};
|
||||
include fastcgi_params;
|
||||
try_files $uri = 404;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/tmp:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
fastcgi_read_timeout 300;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
root {ehcpdir};
|
||||
index index.php;
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root concurs with nginx's one
|
||||
#
|
||||
location ~ (apache_subdomain_template|apachetemplate$|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location / {
|
||||
location ~ ^/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.txt)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.log)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.sh)$ {
|
||||
return 403;
|
||||
}
|
||||
}
|
||||
|
||||
location /phpmyadmin {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 600;
|
||||
}
|
||||
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /usr/share/;
|
||||
}
|
||||
}
|
||||
|
||||
location /phpMyAdmin {
|
||||
rewrite ^/* /phpmyadmin last;
|
||||
# deny access to .htaccess files, if Apache's document root concurs with nginx's one
|
||||
#
|
||||
location ~ (apache_subdomain_template|apachetemplate$|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location /webmail2 {
|
||||
location / {
|
||||
location ~ ^/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.txt)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.log)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/(.+\.sh)$ {
|
||||
return 403;
|
||||
}
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
root {ehcpdir};
|
||||
include fastcgi_params;
|
||||
try_files $uri = 404;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={ehcpdir}:/tmp:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
fastcgi_read_timeout 300;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
|
||||
location /phpmyadmin/ {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 600;
|
||||
}
|
||||
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /usr/share/;
|
||||
}
|
||||
}
|
||||
|
||||
location /webmail2/ {
|
||||
root {ehcpdir}/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/webmail2/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root {ehcpdir}/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir={ehcpdir}/webmail2 \n upload_tmp_dir={ehcpdir}/webmail2/data \n session.save_path={ehcpdir}/webmail2/data";
|
||||
|
@ -90,19 +86,15 @@ server {
|
|||
root {ehcpdir}/;
|
||||
}
|
||||
}
|
||||
|
||||
location /webmail {
|
||||
rewrite ^/* /roundcube last;
|
||||
}
|
||||
|
||||
location /roundcube {
|
||||
location /roundcube/ {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/roundcube/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/lib/roundcube:/etc/roundcube:/usr/share:/tmp:/var/www/php_sessions:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
|
@ -114,6 +106,48 @@ server {
|
|||
root /usr/share/;
|
||||
}
|
||||
}
|
||||
|
||||
location /extplorer/ {
|
||||
root {ehcpdir}/;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
location ~ ^/extplorer/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root {ehcpdir}/;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/www:/tmp:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
}
|
||||
|
||||
# Alias
|
||||
|
||||
location = /webmail2 {
|
||||
return 301 /webmail2/;
|
||||
}
|
||||
|
||||
location = /webmail {
|
||||
return 301 /roundcube/;
|
||||
}
|
||||
|
||||
location = /roundcube {
|
||||
return 301 /roundcube/;
|
||||
}
|
||||
|
||||
location = /phpMyAdmin {
|
||||
return 301 /phpmyadmin/;
|
||||
}
|
||||
|
||||
location = /phpmyadmin {
|
||||
return 301 /phpmyadmin/;
|
||||
}
|
||||
|
||||
location = /extplorer {
|
||||
return 301 /extplorer/;
|
||||
}
|
||||
}
|
||||
# END OF CUSTOM GLOBAL PANEL URLS Template
|
||||
|
||||
|
|
|
@ -2,97 +2,98 @@
|
|||
# nginx default server config file
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
return 301 https://$host$request_uri;
|
||||
listen 80;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
# For SSL CONFIG
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name _;
|
||||
|
||||
ssl_certificate /etc/ssl/certs/server.crt;
|
||||
ssl_certificate_key /etc/ssl/private/server.key;
|
||||
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
listen 443 ssl;
|
||||
server_name _;
|
||||
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
|
||||
root /var/www/new;
|
||||
index index.html index.htm index.php;
|
||||
ssl_certificate /etc/ssl/certs/server.crt;
|
||||
ssl_certificate_key /etc/ssl/private/server.key;
|
||||
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
|
||||
# Set this to off if you're hosting more than one site
|
||||
server_name_in_redirect off;
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
|
||||
# SEO friendly URLs for Wordpress
|
||||
#
|
||||
#location /wordpress/ {
|
||||
# if (!-e $request_filename) {
|
||||
# rewrite ^(.*)$ /wordpress/index.php?q=$1 last;
|
||||
# }
|
||||
#}
|
||||
root /var/www/new;
|
||||
index index.html index.htm index.php;
|
||||
|
||||
#error_page 404 /404.html;
|
||||
# Set this to off if you're hosting more than one site
|
||||
server_name_in_redirect off;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /var/www/nginx-default;
|
||||
}
|
||||
# SEO friendly URLs for Wordpress
|
||||
#
|
||||
#location /wordpress/ {
|
||||
# if (!-e $request_filename) {
|
||||
# rewrite ^(.*)$ /wordpress/index.php?q=$1 last;
|
||||
# }
|
||||
#}
|
||||
|
||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
||||
#
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME /var/www/new$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/www:/tmp:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
#error_page 404 /404.html;
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root concurs with nginx's one
|
||||
#
|
||||
location ~ (apache_subdomain_template|apachetemplate$|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
}
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /var/www/nginx-default;
|
||||
}
|
||||
|
||||
location /ehcp {
|
||||
location ~ ^/ehcp/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.txt)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.log)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.sh)$ {
|
||||
return 403;
|
||||
}
|
||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
||||
#
|
||||
location ~ \.php$ {
|
||||
try_files $uri = 404;
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME /var/www/new$fastcgi_script_name;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/var/www:/tmp:/usr/share:/etc/roundcube:/var/lib/roundcube:/var/log/roundcube \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
}
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root concurs with nginx's one
|
||||
#
|
||||
location ~ (apache_subdomain_template|apachetemplate$|apachetemplate_ipbased|apachetemplate_passivedomains|/\.conf$|/\.ht|access_log|error_log|access\.log|error\.log) {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location /ehcp {
|
||||
location ~ ^/ehcp/(.+\.conf)$ {
|
||||
return 403;
|
||||
}
|
||||
|
||||
location /phpmyadmin {
|
||||
location ~ ^/ehcp/(.+\.txt)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.log)$ {
|
||||
return 403;
|
||||
}
|
||||
location ~ ^/ehcp/(.+\.sh)$ {
|
||||
return 403;
|
||||
}
|
||||
}
|
||||
|
||||
location /phpmyadmin {
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
index index.php index.html index.htm;
|
||||
location ~ ^/phpmyadmin/(.+\.php)$ {
|
||||
try_files $uri =404;
|
||||
root /usr/share/;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 600;
|
||||
}
|
||||
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /usr/share/;
|
||||
}
|
||||
fastcgi_pass 127.0.0.1:9001;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/tmp:/usr/share/php:/usr/share/pear:/usr/share:/var/www/php_sessions \n upload_tmp_dir=/tmp \n session.save_path=/var/www/php_sessions";
|
||||
include /etc/nginx/fastcgi_params;
|
||||
limit_req zone=one burst=5;
|
||||
proxy_send_timeout 600;
|
||||
proxy_read_timeout 600;
|
||||
}
|
||||
|
||||
|
||||
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
|
||||
root /usr/share/;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ types {
|
|||
image/x-ms-bmp bmp;
|
||||
image/svg+xml svg svgz;
|
||||
|
||||
application/csv csv;
|
||||
application/java-archive jar war ear;
|
||||
application/json json;
|
||||
application/mac-binhex40 hqx;
|
||||
|
@ -67,6 +68,7 @@ types {
|
|||
application/octet-stream iso img;
|
||||
application/octet-stream msi msp msm;
|
||||
application/ogg ogx;
|
||||
application/so so;
|
||||
|
||||
audio/midi mid midi kar;
|
||||
audio/mpeg mpga mpega mp2 mp3 m4a;
|
||||
|
|
|
@ -5,46 +5,55 @@ user {wwwuser} {wwwgroup};
|
|||
worker_processes 4;
|
||||
|
||||
error_log /var/log/nginx/default.error.log;
|
||||
pid /var/run/nginx.pid;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
server_names_hash_bucket_size 4096;
|
||||
server_names_hash_bucket_size 4096;
|
||||
variables_hash_max_size 4096;
|
||||
variables_hash_bucket_size 4096;
|
||||
types_hash_max_size 4096;
|
||||
limit_req_zone $binary_remote_addr zone=one:20m rate=10r/s;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
#default_type application/octet-stream;
|
||||
default_type text/html;
|
||||
|
||||
log_format combined_host '$remote_addr - $remote_user [$time_local] '
|
||||
include /etc/nginx/mime.types;
|
||||
#default_type application/octet-stream;
|
||||
default_type text/html;
|
||||
|
||||
log_format combined_host '$remote_addr - $remote_user [$time_local] '
|
||||
'"$host" "$request" $status $body_bytes_sent '
|
||||
'"$http_referer" "$http_user_agent"';
|
||||
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
access_log /var/log/nginx/default.access.log;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
#keepalive_timeout 0;
|
||||
keepalive_timeout 3;
|
||||
tcp_nodelay on;
|
||||
#keepalive_timeout 0;
|
||||
keepalive_timeout 3;
|
||||
tcp_nodelay on;
|
||||
|
||||
gzip on;
|
||||
gzip_comp_level 2;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
gzip on;
|
||||
gzip_comp_level 2;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
# Nginx default value was 1 MB and therefore all uploads exceeding 1 MB was
|
||||
# getting "413 Request Entity Too Large" error.Script default is 64 MB.
|
||||
# Remember to change the settings for upload size in php.ini as well.
|
||||
client_max_body_size 64m;
|
||||
# Nginx default value was 1 MB and therefore all uploads exceeding 1 MB was
|
||||
# getting "413 Request Entity Too Large" error.Script default is 64 MB.
|
||||
# Remember to change the settings for upload size in php.ini as well.
|
||||
client_max_body_size 1024m;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
include /var/www/new/ehcp/apachehcp.conf;
|
||||
include /var/www/new/ehcp/apachehcp_subdomains.conf;
|
||||
include /var/www/new/ehcp/apachehcp_globalpanelurls.conf;
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
include /var/www/new/ehcp/apachehcp.conf;
|
||||
include /var/www/new/ehcp/apachehcp_subdomains.conf;
|
||||
include /var/www/new/ehcp/apachehcp_globalpanelurls.conf;
|
||||
|
||||
##########################
|
||||
# Nginx Bad Bot Blocker #
|
||||
##########################
|
||||
include nginx-badbot-blocker/blacklist.conf;
|
||||
include nginx-badbot-blocker/blockips.conf;
|
||||
}
|
||||
|
|
248
ehcp/etc/pam/pam_dbauth_smtp_python3.py
Normal file
248
ehcp/etc/pam/pam_dbauth_smtp_python3.py
Normal file
|
@ -0,0 +1,248 @@
|
|||
# vim: noai:ts=2:sw=2:set expandtab:
|
||||
#
|
||||
# pam_dbauth.py
|
||||
# Performs salted-hash authentication from a database
|
||||
#
|
||||
"""
|
||||
Author: Eric Windisch <eric@windisch.us>
|
||||
Copyright: 2010, Eric Windisch <eric@grokthis.net>, VPS Village
|
||||
License: EPL v1.0
|
||||
|
||||
Contributor: Eric Arnol-Martin <earnolmartin@gmail.com>
|
||||
Added MySQL Password() Function Support
|
||||
- Requires passlib (sudo pip install passlib)
|
||||
- Fixed port integer bug MySQL
|
||||
- Added logic to handle an already encrypted password being sent in
|
||||
"""
|
||||
|
||||
|
||||
"""
|
||||
Add to PAM configuration with:
|
||||
auth required pam_python.so pam_dbauth.py
|
||||
|
||||
|
||||
Requires configuration file, /etc/security/pam_dbauth.conf,
|
||||
Example:
|
||||
|
||||
[database]
|
||||
host=localhost
|
||||
user=myuser
|
||||
password=mypass
|
||||
db=myuser_db
|
||||
port=XXXX
|
||||
engine=mysqldb
|
||||
; engine=psycopg2
|
||||
; engine=redis
|
||||
|
||||
[query]
|
||||
; SQL Example
|
||||
select_statement=select password from users where username=%s
|
||||
|
||||
; Redis example:
|
||||
; select_statement=users:%s:password
|
||||
|
||||
; ----------------------------------------------------------------
|
||||
; Support forcing or defaulting hashtypes,
|
||||
; ONLY effective if stored password does not start with {hashtype}.
|
||||
; ----------------------------------------------------------------
|
||||
; hashtype_force=sha1
|
||||
;
|
||||
; ----------------------------------------------------------------
|
||||
; Default type to be used if all auto-detection fails (unlikely)
|
||||
; ----------------------------------------------------------------
|
||||
; hashtype_default=md5
|
||||
;
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
import syslog
|
||||
import hashlib
|
||||
import base64
|
||||
import string
|
||||
import traceback
|
||||
import configparser
|
||||
from passlib.hash import mysql41
|
||||
import crypt
|
||||
|
||||
config = configparser.ConfigParser()
|
||||
config.read('/etc/security/pam_dbauth_smtp.conf')
|
||||
|
||||
dbengine=config.get('database','engine')
|
||||
if dbengine == 'mysqldb':
|
||||
import MySQLdb
|
||||
dbengineClass=MySQLdb
|
||||
elif dbengine == 'pyscopg2':
|
||||
import psycopg2
|
||||
dbengineClass=psycopg2
|
||||
elif dbengine == 'redis':
|
||||
import redis
|
||||
dbengineClass=redis
|
||||
else:
|
||||
syslog.syslog ("pam_dbauth.py - Unknown or unspecified database engine")
|
||||
sys.exit(1)
|
||||
|
||||
def pam_sm_authenticate(pamh, flags, argv):
|
||||
resp=pamh.conversation(
|
||||
pamh.Message(pamh.PAM_PROMPT_ECHO_OFF,"Password")
|
||||
)
|
||||
|
||||
try:
|
||||
user = pamh.get_user(None)
|
||||
except pamh.exception as e:
|
||||
return e.pam_result
|
||||
if user == None:
|
||||
return pamh.PAM_USER_UNKNOWN
|
||||
|
||||
try:
|
||||
def safeConfigGet(sect,key):
|
||||
if config.has_option(sect,key):
|
||||
return config.get(sect,key)
|
||||
else:
|
||||
None
|
||||
|
||||
connargs={
|
||||
# Each engine has its own connection string type.
|
||||
# perhaps I might abstract this further into a class,
|
||||
# but for now, this module is light enough, that I
|
||||
# simply won't bother.
|
||||
'mysqldb': {
|
||||
'host': safeConfigGet('database','host'),
|
||||
'user': safeConfigGet('database','user'),
|
||||
'passwd': safeConfigGet('database','password'),
|
||||
'port': int(safeConfigGet('database','port')),
|
||||
'db': safeConfigGet('database','db')
|
||||
},
|
||||
'pyscopg2': {
|
||||
'host': safeConfigGet('database','host'),
|
||||
'user': safeConfigGet('database','user'),
|
||||
'password': safeConfigGet('database','password'),
|
||||
'port': safeConfigGet('database','port'),
|
||||
'db': safeConfigGet('database','db')
|
||||
},
|
||||
'redis': {
|
||||
'host': safeConfigGet('database','host'),
|
||||
'password': safeConfigGet('database','password'),
|
||||
'port': safeConfigGet('database','port'),
|
||||
'db': safeConfigGet('database','db')
|
||||
}
|
||||
}[dbengine]
|
||||
|
||||
# Filter out None vars.
|
||||
for k in connargs.keys():
|
||||
if connargs[k] is None:
|
||||
del connargs[k]
|
||||
|
||||
# Connect to database... finally!
|
||||
db=dbengineClass.connect( **connargs )
|
||||
|
||||
# Query the DB.
|
||||
# All but Redis (so-far) are SQL-based...
|
||||
if dbengine != 'redis':
|
||||
cursor=db.cursor()
|
||||
query=str(config.get('query','select_statement')).format(user)
|
||||
#syslog.syslog ("query is " + query)
|
||||
cursor.execute(query)
|
||||
pass_raw=cursor.fetchone()[0]
|
||||
else:
|
||||
pass_raw=db.get(config.get('query','select_statement' % (user)))
|
||||
|
||||
# Initalize pass_stored to pass_raw... we might change it
|
||||
pass_stored=pass_raw
|
||||
|
||||
# We search for a {} section containing the hashtype
|
||||
htindex=str.find(pass_raw,"}")
|
||||
if htindex > 0:
|
||||
# password contained a hashtype
|
||||
hashtype=pass_raw[1:htindex]
|
||||
# Remove the hashtype indicator
|
||||
pass_stored=pass_raw[htindex:]
|
||||
elif config.has_option('query','hashtype_force'):
|
||||
# if a hashtype is forced on us
|
||||
hashtype=config.get('query','hashtype_force')
|
||||
elif len(pass_raw) == 16:
|
||||
# assume 16-byte length is md5
|
||||
hashtype='md5'
|
||||
elif len(pass_raw) == 20:
|
||||
# assume 20-byte length is sha-1
|
||||
hashtype='ssha1'
|
||||
elif config.has_option('query','hashtype_default'):
|
||||
# attempt to fall back...
|
||||
hashtype=config.get('query','hashtype_default')
|
||||
elif len(pass_raw) == 41:
|
||||
# MySQL Password() function hash
|
||||
hashtype='mysql_password_function'
|
||||
elif pass_stored == resp.resp: # Perhaps an already encrypted password is being sent in like in the case of SMTP sasl auth...
|
||||
return pamh.PAM_SUCCESS
|
||||
elif pass_stored == crypt.crypt(resp.resp, "ehcp"):
|
||||
return pamh.PAM_SUCCESS
|
||||
else:
|
||||
#syslog.syslog ("Unable to determine hash type... the length is " + str(len(pass_raw)))
|
||||
return pamh.PAM_SERVICE_ERR
|
||||
|
||||
if hashtype != 'mysql_password_function':
|
||||
|
||||
pass_decoded=base64.b64decode(pass_stored)
|
||||
|
||||
# Set the hashlib
|
||||
hl={
|
||||
'ssha1': hashlib.sha1(),
|
||||
'sha1': hashlib.sha1(),
|
||||
'md5': hashlib.md5(),
|
||||
}[hashtype]
|
||||
|
||||
pass_base=pass_decoded[:hl.digest_size]
|
||||
pass_salt=pass_decoded[hl.digest_size:]
|
||||
|
||||
hl.update(resp.resp)
|
||||
hl.update(pass_salt)
|
||||
|
||||
hashedrep = base64.b64encode(hl.digest())
|
||||
|
||||
if hl.digest() == pass_base:
|
||||
#syslog.syslog ("pam-dbauth.py hashes match")
|
||||
return pamh.PAM_SUCCESS
|
||||
else:
|
||||
#syslog.syslog ("hashes do not match: " + hl.digest() + " not equal to " + pass_base)
|
||||
pamh.PAM_AUTH_ERR
|
||||
else:
|
||||
if pass_stored == mysql41.encrypt(resp.resp):
|
||||
#syslog.syslog ("pam-dbauth.py hashes match")
|
||||
return pamh.PAM_SUCCESS
|
||||
else:
|
||||
#syslog.syslog ("hashes do not match: " + hl.digest() + " not equal to " + pass_base)
|
||||
pamh.PAM_AUTH_ERR
|
||||
|
||||
except Exception as e:
|
||||
#traceback.print_exc()
|
||||
#syslog.syslog ("pam-dbauth.py exception triggered " + str(e))
|
||||
return pamh.PAM_SERVICE_ERR
|
||||
|
||||
return pamh.PAM_SERVICE_ERR
|
||||
|
||||
def pam_sm_setcred(pamh, flags, argv):
|
||||
return pamh.PAM_SUCCESS
|
||||
|
||||
def pam_sm_acct_mgmt(pamh, flags, argv):
|
||||
return pamh.PAM_SUCCESS
|
||||
|
||||
def pam_sm_open_session(pamh, flags, argv):
|
||||
return pamh.PAM_SUCCESS
|
||||
|
||||
def pam_sm_close_session(pamh, flags, argv):
|
||||
return pamh.PAM_SUCCESS
|
||||
|
||||
def pam_sm_chauthtok(pamh, flags, argv):
|
||||
return pamh.PAM_SUCCESS
|
||||
|
||||
#if __name__ == '__main__':
|
||||
# pam_sm_authenticate(pamh, flags, argv):
|
||||
|
||||
|
||||
"""
|
||||
Author: Eric Windisch <eric@windisch.us>
|
||||
Copyright: 2010, Eric Windisch <eric@grokthis.net>, VPS Village
|
||||
License: EPL v1.0
|
||||
"""
|
||||
|
250
ehcp/etc/pam/pam_dbauth_smtp_ubuntu_20_plus.py
Normal file
250
ehcp/etc/pam/pam_dbauth_smtp_ubuntu_20_plus.py
Normal file
|
@ -0,0 +1,250 @@
|
|||
# vim: noai:ts=2:sw=2:set expandtab:
|
||||
#
|
||||
# pam_dbauth.py
|
||||
# Performs salted-hash authentication from a database
|
||||
#
|
||||
"""
|
||||
Author: Eric Windisch <eric@windisch.us>
|
||||
Copyright: 2010, Eric Windisch <eric@grokthis.net>, VPS Village
|
||||
License: EPL v1.0
|
||||
|
||||
Contributor: Eric Arnol-Martin <earnolmartin@gmail.com>
|
||||
Added MySQL Password() Function Support
|
||||
- Requires passlib (sudo pip install passlib)
|
||||
- Fixed port integer bug MySQL
|
||||
- Added logic to handle an already encrypted password being sent in
|
||||
"""
|
||||
|
||||
|
||||
"""
|
||||
Add to PAM configuration with:
|
||||
auth required pam_python.so pam_dbauth.py
|
||||
|
||||
|
||||
Requires configuration file, /etc/security/pam_dbauth.conf,
|
||||
Example:
|
||||
|
||||
[database]
|
||||
host=localhost
|
||||
user=myuser
|
||||
password=mypass
|
||||
db=myuser_db
|
||||
port=XXXX
|
||||
engine=mysqldb
|
||||
; engine=psycopg2
|
||||
; engine=redis
|
||||
|
||||
[query]
|
||||
; SQL Example
|
||||
select_statement=select password from users where username=%s
|
||||
|
||||
; Redis example:
|
||||
; select_statement=users:%s:password
|
||||
|
||||
; ----------------------------------------------------------------
|
||||
; Support forcing or defaulting hashtypes,
|
||||
; ONLY effective if stored password does not start with {hashtype}.
|
||||
; ----------------------------------------------------------------
|
||||
; hashtype_force=sha1
|
||||
;
|
||||
; ----------------------------------------------------------------
|
||||
; Default type to be used if all auto-detection fails (unlikely)
|
||||
; ----------------------------------------------------------------
|
||||
; hashtype_default=md5
|
||||
;
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
sys.path.insert(0, '/usr/local/lib/python2.7/dist-packages')
|
||||
sys.path.insert(0, '/usr/lib/python2.7/dist-packages')
|
||||
|
||||
import syslog
|
||||
import hashlib
|
||||
import base64
|
||||
import string
|
||||
import traceback
|
||||
import ConfigParser
|
||||
from passlib.hash import mysql41
|
||||
import crypt
|
||||
|
||||
config = ConfigParser.ConfigParser()
|
||||
config.read('/etc/security/pam_dbauth_smtp.conf')
|
||||
|
||||
dbengine=config.get('database','engine')
|
||||
if dbengine == 'mysqldb':
|
||||
import MySQLdb
|
||||
dbengineClass=MySQLdb
|
||||
elif dbengine == 'pyscopg2':
|
||||
import psycopg2
|
||||
dbengineClass=psycopg2
|
||||
elif dbengine == 'redis':
|
||||
import redis
|
||||
dbengineClass=redis
|
||||
else:
|
||||
syslog.syslog ("pam_dbauth.py - Unknown or unspecified database engine")
|
||||
sys.exit(1)
|
||||
|
||||
def pam_sm_authenticate(pamh, flags, argv):
|
||||
resp=pamh.conversation(
|
||||
pamh.Message(pamh.PAM_PROMPT_ECHO_OFF,"Password")
|
||||
)
|
||||
|
||||
try:
|
||||
user = pamh.get_user(None)
|
||||
except pamh.exception, e:
|
||||
return e.pam_result
|
||||
if user == None:
|
||||
return pamh.PAM_USER_UNKNOWN
|
||||
|
||||
try:
|
||||
def safeConfigGet(sect,key):
|
||||
if config.has_option(sect,key):
|
||||
return config.get(sect,key)
|
||||
else:
|
||||
None
|
||||
|
||||
connargs={
|
||||
# Each engine has its own connection string type.
|
||||
# perhaps I might abstract this further into a class,
|
||||
# but for now, this module is light enough, that I
|
||||
# simply won't bother.
|
||||
'mysqldb': {
|
||||
'host': safeConfigGet('database','host'),
|
||||
'user': safeConfigGet('database','user'),
|
||||
'passwd': safeConfigGet('database','password'),
|
||||
'port': int(safeConfigGet('database','port')),
|
||||
'db': safeConfigGet('database','db')
|
||||
},
|
||||
'pyscopg2': {
|
||||
'host': safeConfigGet('database','host'),
|
||||
'user': safeConfigGet('database','user'),
|
||||
'password': safeConfigGet('database','password'),
|
||||
'port': safeConfigGet('database','port'),
|
||||
'db': safeConfigGet('database','db')
|
||||
},
|
||||
'redis': {
|
||||
'host': safeConfigGet('database','host'),
|
||||
'password': safeConfigGet('database','password'),
|
||||
'port': safeConfigGet('database','port'),
|
||||
'db': safeConfigGet('database','db')
|
||||
}
|
||||
}[dbengine]
|
||||
|
||||
# Filter out None vars.
|
||||
for k in connargs.keys():
|
||||
if connargs[k] is None:
|
||||
del connargs[k]
|
||||
|
||||
# Connect to database... finally!
|
||||
db=dbengineClass.connect( **connargs )
|
||||
|
||||
# Query the DB.
|
||||
# All but Redis (so-far) are SQL-based...
|
||||
if dbengine != 'redis':
|
||||
cursor=db.cursor()
|
||||
query=str(config.get('query','select_statement')).format(user)
|
||||
#syslog.syslog ("query is " + query)
|
||||
cursor.execute(query)
|
||||
pass_raw=cursor.fetchone()[0]
|
||||
else:
|
||||
pass_raw=db.get(config.get('query','select_statement' % (user)))
|
||||
|
||||
# Initalize pass_stored to pass_raw... we might change it
|
||||
pass_stored=pass_raw
|
||||
|
||||
# We search for a {} section containing the hashtype
|
||||
htindex=string.find(pass_raw,"}")
|
||||
if htindex > 0:
|
||||
# password contained a hashtype
|
||||
hashtype=pass_raw[1:htindex]
|
||||
# Remove the hashtype indicator
|
||||
pass_stored=pass_raw[htindex:]
|
||||
elif config.has_option('query','hashtype_force'):
|
||||
# if a hashtype is forced on us
|
||||
hashtype=config.get('query','hashtype_force')
|
||||
elif len(pass_raw) == 16:
|
||||
# assume 16-byte length is md5
|
||||
hashtype='md5'
|
||||
elif len(pass_raw) == 20:
|
||||
# assume 20-byte length is sha-1
|
||||
hashtype='ssha1'
|
||||
elif config.has_option('query','hashtype_default'):
|
||||
# attempt to fall back...
|
||||
hashtype=config.get('query','hashtype_default')
|
||||
elif len(pass_raw) == 41:
|
||||
# MySQL Password() function hash
|
||||
hashtype='mysql_password_function'
|
||||
elif pass_stored == resp.resp: # Perhaps an already encrypted password is being sent in like in the case of SMTP sasl auth...
|
||||
return pamh.PAM_SUCCESS
|
||||
elif pass_stored == crypt.crypt(resp.resp, "ehcp"):
|
||||
return pamh.PAM_SUCCESS
|
||||
else:
|
||||
#syslog.syslog ("Unable to determine hash type... the length is " + str(len(pass_raw)))
|
||||
return pamh.PAM_SERVICE_ERR
|
||||
|
||||
if hashtype != 'mysql_password_function':
|
||||
|
||||
pass_decoded=base64.b64decode(pass_stored)
|
||||
|
||||
# Set the hashlib
|
||||
hl={
|
||||
'ssha1': hashlib.sha1(),
|
||||
'sha1': hashlib.sha1(),
|
||||
'md5': hashlib.md5(),
|
||||
}[hashtype]
|
||||
|
||||
pass_base=pass_decoded[:hl.digest_size]
|
||||
pass_salt=pass_decoded[hl.digest_size:]
|
||||
|
||||
hl.update(resp.resp)
|
||||
hl.update(pass_salt)
|
||||
|
||||
hashedrep = base64.b64encode(hl.digest())
|
||||
|
||||
if hl.digest() == pass_base:
|
||||
#syslog.syslog ("pam-dbauth.py hashes match")
|
||||
return pamh.PAM_SUCCESS
|
||||
else:
|
||||
#syslog.syslog ("hashes do not match: " + hl.digest() + " not equal to " + pass_base)
|
||||
pamh.PAM_AUTH_ERR
|
||||
else:
|
||||
if pass_stored == mysql41.encrypt(resp.resp):
|
||||
#syslog.syslog ("pam-dbauth.py hashes match")
|
||||
return pamh.PAM_SUCCESS
|
||||
else:
|
||||
#syslog.syslog ("hashes do not match: " + hl.digest() + " not equal to " + pass_base)
|
||||
pamh.PAM_AUTH_ERR
|
||||
|
||||
except Exception,e:
|
||||
#traceback.print_exc()
|
||||
#syslog.syslog ("pam-dbauth.py exception triggered " + str(e))
|
||||
return pamh.PAM_SERVICE_ERR
|
||||
|
||||
return pamh.PAM_SERVICE_ERR
|
||||
|
||||
def pam_sm_setcred(pamh, flags, argv):
|
||||
return pamh.PAM_SUCCESS
|
||||
|
||||
def pam_sm_acct_mgmt(pamh, flags, argv):
|
||||
return pamh.PAM_SUCCESS
|
||||
|
||||
def pam_sm_open_session(pamh, flags, argv):
|
||||
return pamh.PAM_SUCCESS
|
||||
|
||||
def pam_sm_close_session(pamh, flags, argv):
|
||||
return pamh.PAM_SUCCESS
|
||||
|
||||
def pam_sm_chauthtok(pamh, flags, argv):
|
||||
return pamh.PAM_SUCCESS
|
||||
|
||||
#if __name__ == '__main__':
|
||||
# pam_sm_authenticate(pamh, flags, argv):
|
||||
|
||||
|
||||
"""
|
||||
Author: Eric Windisch <eric@windisch.us>
|
||||
Copyright: 2010, Eric Windisch <eric@grokthis.net>, VPS Village
|
||||
License: EPL v1.0
|
||||
"""
|
||||
|
246
ehcp/etc/pam/pam_dbauth_vsftpd_python3.py
Normal file
246
ehcp/etc/pam/pam_dbauth_vsftpd_python3.py
Normal file
|
@ -0,0 +1,246 @@
|
|||
# vim: noai:ts=2:sw=2:set expandtab:
|
||||
#
|
||||
# pam_dbauth.py
|
||||
# Performs salted-hash authentication from a database
|
||||
#
|
||||
"""
|
||||
Author: Eric Windisch <eric@windisch.us>
|
||||
Copyright: 2010, Eric Windisch <eric@grokthis.net>, VPS Village
|
||||
License: EPL v1.0
|
||||
|
||||
Contributor: Eric Arnol-Martin <earnolmartin@gmail.com>
|
||||
Added MySQL Password() Function Support
|
||||
- Requires passlib (sudo pip install passlib)
|
||||
- Fixed port integer bug MySQL
|
||||
- Added logic to handle an already encrypted password being sent in
|
||||
"""
|
||||
|
||||
|
||||
"""
|
||||
Add to PAM configuration with:
|
||||
auth required pam_python.so pam_dbauth.py
|
||||
|
||||
|
||||
Requires configuration file, /etc/security/pam_dbauth.conf,
|
||||
Example:
|
||||
|
||||
[database]
|
||||
host=localhost
|
||||
user=myuser
|
||||
password=mypass
|
||||
db=myuser_db
|
||||
port=XXXX
|
||||
engine=mysqldb
|
||||
; engine=psycopg2
|
||||
; engine=redis
|
||||
|
||||
[query]
|
||||
; SQL Example
|
||||
select_statement=select password from users where username=%s
|
||||
|
||||
; Redis example:
|
||||
; select_statement=users:%s:password
|
||||
|
||||
; ----------------------------------------------------------------
|
||||
; Support forcing or defaulting hashtypes,
|
||||
; ONLY effective if stored password does not start with {hashtype}.
|
||||
; ----------------------------------------------------------------
|
||||
; hashtype_force=sha1
|
||||
;
|
||||
; ----------------------------------------------------------------
|
||||
; Default type to be used if all auto-detection fails (unlikely)
|
||||
; ----------------------------------------------------------------
|
||||
; hashtype_default=md5
|
||||
;
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
import syslog
|
||||
import hashlib
|
||||
import base64
|
||||
import string
|
||||
import traceback
|
||||
import configparser
|
||||
from passlib.hash import mysql41
|
||||
|
||||
config = configparser.ConfigParser()
|
||||
config.read('/etc/security/pam_dbauth_vsftpd.conf')
|
||||
|
||||
dbengine=config.get('database','engine')
|
||||
if dbengine == 'mysqldb':
|
||||
import MySQLdb
|
||||
dbengineClass=MySQLdb
|
||||
elif dbengine == 'pyscopg2':
|
||||
import psycopg2
|
||||
dbengineClass=psycopg2
|
||||
elif dbengine == 'redis':
|
||||
import redis
|
||||
dbengineClass=redis
|
||||
else:
|
||||
syslog.syslog ("pam_dbauth.py - Unknown or unspecified database engine")
|
||||
sys.exit(1)
|
||||
|
||||
def pam_sm_authenticate(pamh, flags, argv):
|
||||
resp=pamh.conversation(
|
||||
pamh.Message(pamh.PAM_PROMPT_ECHO_OFF,"Password")
|
||||
)
|
||||
|
||||
try:
|
||||
user = pamh.get_user(None)
|
||||
except pamh.exception as e:
|
||||
return e.pam_result
|
||||
if user == None:
|
||||
return pamh.PAM_USER_UNKNOWN
|
||||
|
||||
try:
|
||||
def safeConfigGet(sect,key):
|
||||
if config.has_option(sect,key):
|
||||
return config.get(sect,key)
|
||||
else:
|
||||
None
|
||||
|
||||
connargs={
|
||||
# Each engine has its own connection string type.
|
||||
# perhaps I might abstract this further into a class,
|
||||
# but for now, this module is light enough, that I
|
||||
# simply won't bother.
|
||||
'mysqldb': {
|
||||
'host': safeConfigGet('database','host'),
|
||||
'user': safeConfigGet('database','user'),
|
||||
'passwd': safeConfigGet('database','password'),
|
||||
'port': int(safeConfigGet('database','port')),
|
||||
'db': safeConfigGet('database','db')
|
||||
},
|
||||
'pyscopg2': {
|
||||
'host': safeConfigGet('database','host'),
|
||||
'user': safeConfigGet('database','user'),
|
||||
'password': safeConfigGet('database','password'),
|
||||
'port': safeConfigGet('database','port'),
|
||||
'db': safeConfigGet('database','db')
|
||||
},
|
||||
'redis': {
|
||||
'host': safeConfigGet('database','host'),
|
||||
'password': safeConfigGet('database','password'),
|
||||
'port': safeConfigGet('database','port'),
|
||||
'db': safeConfigGet('database','db')
|
||||
}
|
||||
}[dbengine]
|
||||
|
||||
# Filter out None vars.
|
||||
for k in connargs.keys():
|
||||
if connargs[k] is None:
|
||||
del connargs[k]
|
||||
|
||||
# Connect to database... finally!
|
||||
db=dbengineClass.connect( **connargs )
|
||||
|
||||
# Query the DB.
|
||||
# All but Redis (so-far) are SQL-based...
|
||||
if dbengine != 'redis':
|
||||
cursor=db.cursor()
|
||||
query=str(config.get('query','select_statement')).format(user)
|
||||
#syslog.syslog ("query is " + query)
|
||||
cursor.execute(query)
|
||||
pass_raw=cursor.fetchone()[0]
|
||||
else:
|
||||
pass_raw=db.get(config.get('query','select_statement' % (user)))
|
||||
|
||||
# Initalize pass_stored to pass_raw... we might change it
|
||||
pass_stored=pass_raw
|
||||
|
||||
# We search for a {} section containing the hashtype
|
||||
htindex=str.find(pass_raw,"}")
|
||||
if htindex > 0:
|
||||
# password contained a hashtype
|
||||
hashtype=pass_raw[1:htindex]
|
||||
# Remove the hashtype indicator
|
||||
pass_stored=pass_raw[htindex:]
|
||||
elif config.has_option('query','hashtype_force'):
|
||||
# if a hashtype is forced on us
|
||||
hashtype=config.get('query','hashtype_force')
|
||||
elif len(pass_raw) == 16:
|
||||
# assume 16-byte length is md5
|
||||
hashtype='md5'
|
||||
elif len(pass_raw) == 20:
|
||||
# assume 20-byte length is sha-1
|
||||
hashtype='ssha1'
|
||||
elif config.has_option('query','hashtype_default'):
|
||||
# attempt to fall back...
|
||||
hashtype=config.get('query','hashtype_default')
|
||||
elif len(pass_raw) == 41:
|
||||
# MySQL Password() function hash
|
||||
hashtype='mysql_password_function'
|
||||
elif pass_stored == resp.resp: # Perhaps an already encrypted password is being sent in like in the case of SMTP sasl auth...
|
||||
return pamh.PAM_SUCCESS
|
||||
else:
|
||||
#syslog.syslog ("Unable to determine hash type... the length is " + str(len(pass_raw)))
|
||||
return pamh.PAM_SERVICE_ERR
|
||||
|
||||
if hashtype != 'mysql_password_function':
|
||||
|
||||
pass_decoded=base64.b64decode(pass_stored)
|
||||
|
||||
# Set the hashlib
|
||||
hl={
|
||||
'ssha1': hashlib.sha1(),
|
||||
'sha1': hashlib.sha1(),
|
||||
'md5': hashlib.md5(),
|
||||
}[hashtype]
|
||||
|
||||
pass_base=pass_decoded[:hl.digest_size]
|
||||
pass_salt=pass_decoded[hl.digest_size:]
|
||||
|
||||
hl.update(resp.resp)
|
||||
hl.update(pass_salt)
|
||||
|
||||
hashedrep = base64.b64encode(hl.digest())
|
||||
|
||||
if hl.digest() == pass_base:
|
||||
#syslog.syslog ("pam-dbauth.py hashes match")
|
||||
return pamh.PAM_SUCCESS
|
||||
else:
|
||||
#syslog.syslog ("hashes do not match: " + hl.digest() + " not equal to " + pass_base)
|
||||
pamh.PAM_AUTH_ERR
|
||||
else:
|
||||
if pass_stored == mysql41.encrypt(resp.resp):
|
||||
#syslog.syslog ("pam-dbauth.py hashes match")
|
||||
return pamh.PAM_SUCCESS
|
||||
else:
|
||||
#syslog.syslog ("hashes do not match: " + hl.digest() + " not equal to " + pass_base)
|
||||
pamh.PAM_AUTH_ERR
|
||||
|
||||
except Exception as e:
|
||||
#traceback.print_exc()
|
||||
#syslog.syslog ("pam-dbauth.py exception triggered " + str(e))
|
||||
return pamh.PAM_SERVICE_ERR
|
||||
|
||||
return pamh.PAM_SERVICE_ERR
|
||||
|
||||
def pam_sm_setcred(pamh, flags, argv):
|
||||
return pamh.PAM_SUCCESS
|
||||
|
||||
def pam_sm_acct_mgmt(pamh, flags, argv):
|
||||
return pamh.PAM_SUCCESS
|
||||
|
||||
def pam_sm_open_session(pamh, flags, argv):
|
||||
return pamh.PAM_SUCCESS
|
||||
|
||||
def pam_sm_close_session(pamh, flags, argv):
|
||||
return pamh.PAM_SUCCESS
|
||||
|
||||
def pam_sm_chauthtok(pamh, flags, argv):
|
||||
return pamh.PAM_SUCCESS
|
||||
|
||||
#if __name__ == '__main__':
|
||||
# pam_sm_authenticate(pamh, flags, argv):
|
||||
|
||||
|
||||
"""
|
||||
Author: Eric Windisch <eric@windisch.us>
|
||||
Copyright: 2010, Eric Windisch <eric@grokthis.net>, VPS Village
|
||||
License: EPL v1.0
|
||||
"""
|
||||
|
||||
|
247
ehcp/etc/pam/pam_dbauth_vsftpd_ubuntu_20_plus.py
Normal file
247
ehcp/etc/pam/pam_dbauth_vsftpd_ubuntu_20_plus.py
Normal file
|
@ -0,0 +1,247 @@
|
|||
# vim: noai:ts=2:sw=2:set expandtab:
|
||||
#
|
||||
# pam_dbauth.py
|
||||
# Performs salted-hash authentication from a database
|
||||
#
|
||||
"""
|
||||
Author: Eric Windisch <eric@windisch.us>
|
||||
Copyright: 2010, Eric Windisch <eric@grokthis.net>, VPS Village
|
||||
License: EPL v1.0
|
||||
|
||||
Contributor: Eric Arnol-Martin <earnolmartin@gmail.com>
|
||||
Added MySQL Password() Function Support
|
||||
- Requires passlib (sudo pip install passlib)
|
||||
- Fixed port integer bug MySQL
|
||||
- Added logic to handle an already encrypted password being sent in
|
||||
"""
|
||||
|
||||
|
||||
"""
|
||||
Add to PAM configuration with:
|
||||
auth required pam_python.so pam_dbauth.py
|
||||
|
||||
|
||||
Requires configuration file, /etc/security/pam_dbauth.conf,
|
||||
Example:
|
||||
|
||||
[database]
|
||||
host=localhost
|
||||
user=myuser
|
||||
password=mypass
|
||||
db=myuser_db
|
||||
port=XXXX
|
||||
engine=mysqldb
|
||||
; engine=psycopg2
|
||||
; engine=redis
|
||||
|
||||
[query]
|
||||
; SQL Example
|
||||
select_statement=select password from users where username=%s
|
||||
|
||||
; Redis example:
|
||||
; select_statement=users:%s:password
|
||||
|
||||
; ----------------------------------------------------------------
|
||||
; Support forcing or defaulting hashtypes,
|
||||
; ONLY effective if stored password does not start with {hashtype}.
|
||||
; ----------------------------------------------------------------
|
||||
; hashtype_force=sha1
|
||||
;
|
||||
; ----------------------------------------------------------------
|
||||
; Default type to be used if all auto-detection fails (unlikely)
|
||||
; ----------------------------------------------------------------
|
||||
; hashtype_default=md5
|
||||
;
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
sys.path.insert(0, '/usr/local/lib/python2.7/dist-packages')
|
||||
sys.path.insert(0, '/usr/lib/python2.7/dist-packages')
|
||||
|
||||
import syslog
|
||||
import hashlib
|
||||
import base64
|
||||
import string
|
||||
import traceback
|
||||
import ConfigParser
|
||||
from passlib.hash import mysql41
|
||||
|
||||
config = ConfigParser.ConfigParser()
|
||||
config.read('/etc/security/pam_dbauth_vsftpd.conf')
|
||||
|
||||
dbengine=config.get('database','engine')
|
||||
if dbengine == 'mysqldb':
|
||||
import MySQLdb
|
||||
dbengineClass=MySQLdb
|
||||
elif dbengine == 'pyscopg2':
|
||||
import psycopg2
|
||||
dbengineClass=psycopg2
|
||||
elif dbengine == 'redis':
|
||||
import redis
|
||||
dbengineClass=redis
|
||||
else:
|
||||
syslog.syslog ("pam_dbauth.py - Unknown or unspecified database engine")
|
||||
sys.exit(1)
|
||||
|
||||
def pam_sm_authenticate(pamh, flags, argv):
|
||||
resp=pamh.conversation(
|
||||
pamh.Message(pamh.PAM_PROMPT_ECHO_OFF,"Password")
|
||||
)
|
||||
|
||||
try:
|
||||
user = pamh.get_user(None)
|
||||
except pamh.exception, e:
|
||||
return e.pam_result
|
||||
if user == None:
|
||||
return pamh.PAM_USER_UNKNOWN
|
||||
|
||||
try:
|
||||
def safeConfigGet(sect,key):
|
||||
if config.has_option(sect,key):
|
||||
return config.get(sect,key)
|
||||
else:
|
||||
None
|
||||
|
||||
connargs={
|
||||
# Each engine has its own connection string type.
|
||||
# perhaps I might abstract this further into a class,
|
||||
# but for now, this module is light enough, that I
|
||||
# simply won't bother.
|
||||
'mysqldb': {
|
||||
'host': safeConfigGet('database','host'),
|
||||
'user': safeConfigGet('database','user'),
|
||||
'passwd': safeConfigGet('database','password'),
|
||||
'port': int(safeConfigGet('database','port')),
|
||||
'db': safeConfigGet('database','db')
|
||||
},
|
||||
'pyscopg2': {
|
||||
'host': safeConfigGet('database','host'),
|
||||
'user': safeConfigGet('database','user'),
|
||||
'password': safeConfigGet('database','password'),
|
||||
'port': safeConfigGet('database','port'),
|
||||
'db': safeConfigGet('database','db')
|
||||
},
|
||||
'redis': {
|
||||
'host': safeConfigGet('database','host'),
|
||||
'password': safeConfigGet('database','password'),
|
||||
'port': safeConfigGet('database','port'),
|
||||
'db': safeConfigGet('database','db')
|
||||
}
|
||||
}[dbengine]
|
||||
|
||||
# Filter out None vars.
|
||||
for k in connargs.keys():
|
||||
if connargs[k] is None:
|
||||
del connargs[k]
|
||||
|
||||
# Connect to database... finally!
|
||||
db=dbengineClass.connect( **connargs )
|
||||
|
||||
# Query the DB.
|
||||
# All but Redis (so-far) are SQL-based...
|
||||
if dbengine != 'redis':
|
||||
cursor=db.cursor()
|
||||
query=str(config.get('query','select_statement')).format(user)
|
||||
#syslog.syslog ("query is " + query)
|
||||
cursor.execute(query)
|
||||
pass_raw=cursor.fetchone()[0]
|
||||
else:
|
||||
pass_raw=db.get(config.get('query','select_statement' % (user)))
|
||||
|
||||
# Initalize pass_stored to pass_raw... we might change it
|
||||
pass_stored=pass_raw
|
||||
|
||||
# We search for a {} section containing the hashtype
|
||||
htindex=string.find(pass_raw,"}")
|
||||
if htindex > 0:
|
||||
# password contained a hashtype
|
||||
hashtype=pass_raw[1:htindex]
|
||||
# Remove the hashtype indicator
|
||||
pass_stored=pass_raw[htindex:]
|
||||
elif config.has_option('query','hashtype_force'):
|
||||
# if a hashtype is forced on us
|
||||
hashtype=config.get('query','hashtype_force')
|
||||
elif len(pass_raw) == 16:
|
||||
# assume 16-byte length is md5
|
||||
hashtype='md5'
|
||||
elif len(pass_raw) == 20:
|
||||
# assume 20-byte length is sha-1
|
||||
hashtype='ssha1'
|
||||
elif config.has_option('query','hashtype_default'):
|
||||
# attempt to fall back...
|
||||
hashtype=config.get('query','hashtype_default')
|
||||
elif len(pass_raw) == 41:
|
||||
# MySQL Password() function hash
|
||||
hashtype='mysql_password_function'
|
||||
elif pass_stored == resp.resp: # Perhaps an already encrypted password is being sent in like in the case of SMTP sasl auth...
|
||||
return pamh.PAM_SUCCESS
|
||||
else:
|
||||
#syslog.syslog ("Unable to determine hash type... the length is " + str(len(pass_raw)))
|
||||
return pamh.PAM_SERVICE_ERR
|
||||
|
||||
if hashtype != 'mysql_password_function':
|
||||
|
||||
pass_decoded=base64.b64decode(pass_stored)
|
||||
|
||||
# Set the hashlib
|
||||
hl={
|
||||
'ssha1': hashlib.sha1(),
|
||||
'sha1': hashlib.sha1(),
|
||||
'md5': hashlib.md5(),
|
||||
}[hashtype]
|
||||
|
||||
pass_base=pass_decoded[:hl.digest_size]
|
||||
pass_salt=pass_decoded[hl.digest_size:]
|
||||
|
||||
hl.update(resp.resp)
|
||||
hl.update(pass_salt)
|
||||
|
||||
hashedrep = base64.b64encode(hl.digest())
|
||||
|
||||
if hl.digest() == pass_base:
|
||||
#syslog.syslog ("pam-dbauth.py hashes match")
|
||||
return pamh.PAM_SUCCESS
|
||||
else:
|
||||
#syslog.syslog ("hashes do not match: " + hl.digest() + " not equal to " + pass_base)
|
||||
pamh.PAM_AUTH_ERR
|
||||
else:
|
||||
if pass_stored == mysql41.encrypt(resp.resp):
|
||||
#syslog.syslog ("pam-dbauth.py hashes match")
|
||||
return pamh.PAM_SUCCESS
|
||||
else:
|
||||
#syslog.syslog ("hashes do not match: " + hl.digest() + " not equal to " + pass_base)
|
||||
pamh.PAM_AUTH_ERR
|
||||
|
||||
except Exception,e:
|
||||
#traceback.print_exc()
|
||||
#syslog.syslog ("pam-dbauth.py exception triggered " + str(e))
|
||||
return pamh.PAM_SERVICE_ERR
|
||||
|
||||
return pamh.PAM_SERVICE_ERR
|
||||
|
||||
def pam_sm_setcred(pamh, flags, argv):
|
||||
return pamh.PAM_SUCCESS
|
||||
|
||||
def pam_sm_acct_mgmt(pamh, flags, argv):
|
||||
return pamh.PAM_SUCCESS
|
||||
|
||||
def pam_sm_open_session(pamh, flags, argv):
|
||||
return pamh.PAM_SUCCESS
|
||||
|
||||
def pam_sm_close_session(pamh, flags, argv):
|
||||
return pamh.PAM_SUCCESS
|
||||
|
||||
def pam_sm_chauthtok(pamh, flags, argv):
|
||||
return pamh.PAM_SUCCESS
|
||||
|
||||
#if __name__ == '__main__':
|
||||
# pam_sm_authenticate(pamh, flags, argv):
|
||||
|
||||
|
||||
"""
|
||||
Author: Eric Windisch <eric@windisch.us>
|
||||
Copyright: 2010, Eric Windisch <eric@grokthis.net>, VPS Village
|
||||
License: EPL v1.0
|
||||
"""
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
$allow = 0;
|
||||
|
||||
// Get remote IP address
|
||||
$clientIP = $_SERVER['REMOTE_ADDR'];
|
||||
$clientIP = getIPAddress();
|
||||
|
||||
// Is the client's IP address a private IP?
|
||||
// If so, allow root login
|
||||
|
|
|
@ -24,6 +24,26 @@
|
|||
}
|
||||
}
|
||||
|
||||
if (filter_var($IP, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) && !filter_var($IP, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE )){
|
||||
return true;
|
||||
}
|
||||
|
||||
if (filter_var($IP, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) && !filter_var($IP, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE )){
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function getIPAddress(){
|
||||
if(isset($_SERVER['HTTP_CF_CONNECTING_IP']) && !empty($_SERVER['HTTP_CF_CONNECTING_IP'])){
|
||||
return $_SERVER['HTTP_CF_CONNECTING_IP'];
|
||||
}else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) && !empty($_SERVER['HTTP_X_FORWARDED_FOR'])){
|
||||
return $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
}else if(isset($_SERVER['HTTP_X_REAL_IP']) && !empty($_SERVER['HTTP_X_REAL_IP'])){
|
||||
return $_SERVER['HTTP_X_REAL_IP'];
|
||||
}else{
|
||||
return $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -59,6 +59,7 @@ smtpd_tls_session_cache_timeout = 3600s
|
|||
tls_random_source = dev:/dev/urandom
|
||||
virtual_create_maildirsize = yes
|
||||
virtual_mailbox_extended = yes
|
||||
virtual_maildir_extended = yes
|
||||
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
|
||||
virtual_mailbox_limit_override = yes
|
||||
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
|
||||
|
|
|
@ -43,10 +43,8 @@ $GLOBALS['ext_version'] = '2.1.9';
|
|||
$GLOBALS['ext_home'] = 'http://extplorer.net';
|
||||
$dir = '';
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
if( defined( 'E_STRICT' ) ) { // Suppress Strict Standards Warnings
|
||||
error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE);
|
||||
}
|
||||
error_reporting(0);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
umask(0002); // Added to make created files/dirs group writable
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
|
@ -41,7 +41,7 @@ class ext_Action {
|
|||
* @param string $dir
|
||||
* @param string $item
|
||||
*/
|
||||
function execAction( $dir, $item ) {
|
||||
public static function execAction( $dir, $item ) {
|
||||
// to be overridden by the child class
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ if( !defined( '_JEXEC' ) && !defined( '_VALID_MOS' ) ) die( 'Restricted access'
|
|||
|
||||
//-------------Configuration Variables---------------------------------------------
|
||||
// Send gzipped content if accepted by the browser?
|
||||
$GLOBALS['use_gzip'] = 1;
|
||||
$GLOBALS['use_gzip'] = 0;
|
||||
|
||||
// Name of the authentication module which is used by default
|
||||
$GLOBALS['ext_conf']['authentication_method_default'] = 'ehcp';
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
<?php
|
||||
session_start();
|
||||
echo $_SESSION['FTP_HOME_PATH'];
|
||||
|
||||
?>
|
|
@ -43,13 +43,13 @@ function make_list($_list1, $_list2) { // make list of files
|
|||
}
|
||||
|
||||
if(is_array($list1)) {
|
||||
while (list($key, $val) = each($list1)) {
|
||||
foreach($list1 as $key => $val) {
|
||||
$list[$key] = $val;
|
||||
}
|
||||
}
|
||||
|
||||
if(is_array($list2)) {
|
||||
while (list($key, $val) = each($list2)) {
|
||||
foreach($list2 as $key => $val) {
|
||||
$list[$key] = $val;
|
||||
}
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ function print_table($dir, $list, $allow) { // print table of files
|
|||
}
|
||||
$i = 0;
|
||||
|
||||
while(list($item,) = each($list)){
|
||||
foreach($list as $item => $val) {
|
||||
if( $item == 'index.html') {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ if( !defined( '_JEXEC' ) && !defined( '_VALID_MOS' ) ) die( 'Restricted access'
|
|||
*/
|
||||
class ext_Archive extends ext_Action {
|
||||
|
||||
function execAction( $dir, $item="" ) {
|
||||
public static function execAction( $dir, $item="" ) {
|
||||
|
||||
if(($GLOBALS["permissions"]&01)!=01) {
|
||||
ext_Result::sendResult('archive', false, $GLOBALS["error_msg"]["accessfunc"]);
|
||||
|
|
|
@ -56,7 +56,11 @@ class ext_ehcp_authentication {
|
|||
}
|
||||
|
||||
function onShowLoginForm() {
|
||||
echo "<p style='color: red; text-align: center;'>Unauthorized. Please login to the <a href='../ehcp'>EHCP panel</a> and try again.</p>";
|
||||
if(!isset($_SESSION['FTP_HOME_PATH']) || empty($_SESSION['FTP_HOME_PATH'])){
|
||||
echo "<p style='color: red; text-align: center;'>Please <a href='../index.php?op=addDomainToThisPaneluser'>add a domain to your EHCP account</a> before using extplorer.";
|
||||
}else{
|
||||
echo "<p style='color: red; text-align: center;'>Unauthorized. Please login to the <a href='../'>EHCP panel</a> and try again.</p>";
|
||||
}
|
||||
}
|
||||
|
||||
function onLogout() {
|
||||
|
|
|
@ -38,7 +38,7 @@ if( !defined( '_JEXEC' ) && !defined( '_VALID_MOS' ) ) die( 'Restricted access'
|
|||
*
|
||||
*/
|
||||
class ext_Chmod extends ext_Action {
|
||||
function execAction($dir, $item) { // change permissions
|
||||
public static function execAction($dir, $item) { // change permissions
|
||||
|
||||
if(($GLOBALS["permissions"]&01)!=01) ext_Result::sendResult( 'chmod', false, $GLOBALS["error_msg"]["accessfunc"]);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ if( !defined( '_JEXEC' ) && !defined( '_VALID_MOS' ) ) die( 'Restricted access'
|
|||
*/
|
||||
class ext_Delete extends ext_Action {
|
||||
|
||||
function execAction($dir, $item="") {
|
||||
public static function execAction($dir, $item="") {
|
||||
// delete files/dirs
|
||||
if(($GLOBALS["permissions"]&01)!=01)
|
||||
ext_Result::sendResult('delete', false, $GLOBALS["error_msg"]["accessfunc"]);
|
||||
|
|
|
@ -57,7 +57,7 @@ class ext_Diff extends ext_Action {
|
|||
'slovenian' => 'sk'
|
||||
);
|
||||
|
||||
function execAction($dir, $item) {
|
||||
public static function execAction($dir, $item) {
|
||||
|
||||
if(($GLOBALS["permissions"]&01)!=01) {
|
||||
ext_Result::sendResult('diff', false, ext_Lang::err('accessfunc' ));
|
||||
|
@ -76,7 +76,7 @@ class ext_Diff extends ext_Action {
|
|||
}
|
||||
$item2 = extGetParam( $_POST, 'item2');
|
||||
if ($item2 !== null) {
|
||||
$fname2 = get_abs_item('', utf8_decode($item2));
|
||||
$fname2 = get_abs_item('', utf8_decode($item2), true);
|
||||
}
|
||||
elseif( $cnt >= 2 ) {
|
||||
$item2 = $GLOBALS['__POST']["selitems"][1];
|
||||
|
@ -101,7 +101,7 @@ class ext_Diff extends ext_Action {
|
|||
|
||||
//$content = nl2br(str_replace("\t", " ", htmlentities($content)));
|
||||
//$content2 = nl2br(str_replace("\t", " ", htmlentities($content2)));
|
||||
$diff = $this->inline_diff($content, $content2);
|
||||
$diff = ext_Diff::inline_diff($content, $content2);
|
||||
if( empty( $diff )) {
|
||||
ext_Result::sendResult('diff', true, 'Both Files are identical');
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ class ext_Diff extends ext_Action {
|
|||
* @param string $text2
|
||||
* @return string
|
||||
*/
|
||||
function inline_diff($text1, $text2)
|
||||
public static function inline_diff($text1, $text2)
|
||||
{
|
||||
$hlines1 = explode("\n", $text1);
|
||||
$hlines2 = explode("\n", $text2);
|
||||
|
@ -188,4 +188,4 @@ class ext_Diff extends ext_Action {
|
|||
|
||||
return $renderer->render($diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ if (!defined('_JEXEC') && !defined('_VALID_MOS')) die('Restricted access');
|
|||
class ext_Download extends ext_Action {
|
||||
|
||||
// download file
|
||||
function execAction($dir, $item, $unlink=false) {
|
||||
public static function execAction($dir, $item, $unlink=false) {
|
||||
|
||||
//die($dir);
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ if( !defined( '_JEXEC' ) && !defined( '_VALID_MOS' ) ) die( 'Restricted access'
|
|||
* File-Edit Functions
|
||||
*/
|
||||
class ext_Edit extends ext_Action {
|
||||
var $lang_tbl = Array(
|
||||
public static $lang_tbl = Array(
|
||||
'czech' => 'cs',
|
||||
'german' => 'de',
|
||||
'danish' => 'dk',
|
||||
|
@ -55,7 +55,7 @@ class ext_Edit extends ext_Action {
|
|||
'slovenian' => 'sk'
|
||||
);
|
||||
|
||||
function execAction($dir, $item) { // edit file
|
||||
public static function execAction($dir, $item) { // edit file
|
||||
global $mainframe, $mosConfig_live_site;
|
||||
|
||||
if(($GLOBALS["permissions"]&01)!=01) {
|
||||
|
@ -86,7 +86,7 @@ class ext_Edit extends ext_Action {
|
|||
ext_Result::sendResult('edit', false, $item.": ".ext_Lang::err('itemdoesexist' ));
|
||||
}
|
||||
|
||||
$this->savefile($fname2);
|
||||
ext_Edit::savefile($fname2);
|
||||
$fname=$fname2;
|
||||
|
||||
ext_Result::sendResult('edit', true, ext_Lang::msg('savefile').': '.$item );
|
||||
|
@ -96,7 +96,7 @@ class ext_Edit extends ext_Action {
|
|||
// File Reopen
|
||||
$extra = Array();
|
||||
$content = $GLOBALS['ext_File']->file_get_contents( $fname );
|
||||
if( get_magic_quotes_runtime()) {
|
||||
if(function_exists("get_magic_quotes_runtime") && get_magic_quotes_runtime()) {
|
||||
$content = stripslashes( $content );
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ class ext_Edit extends ext_Action {
|
|||
$cp_lang = '';
|
||||
}
|
||||
$content = $GLOBALS['ext_File']->file_get_contents( $fname );
|
||||
if( get_magic_quotes_runtime()) {
|
||||
if(function_exists("get_magic_quotes_runtime") && get_magic_quotes_runtime()) {
|
||||
$content = stripslashes( $content );
|
||||
}
|
||||
$cw = 250;
|
||||
|
@ -277,8 +277,8 @@ class ext_Edit extends ext_Action {
|
|||
"start_highlight": true,
|
||||
"display": "later",
|
||||
"toolbar": "search, go_to_line, |, undo, redo, |, select_font,|, change_smooth_selection, highlight, reset_highlight, |, help"
|
||||
<?php if (array_key_exists($langs, $this->lang_tbl)){?>
|
||||
,"language": "<?php echo $this->lang_tbl[$langs] ?>"
|
||||
<?php if (array_key_exists($langs, ext_Edit::$lang_tbl)){?>
|
||||
,"language": "<?php echo ext_Edit::$lang_tbl[$langs] ?>"
|
||||
<?php
|
||||
} ?>
|
||||
})
|
||||
|
@ -322,13 +322,8 @@ class ext_Edit extends ext_Action {
|
|||
<?php
|
||||
|
||||
}
|
||||
function savefile($file_name) { // save edited file
|
||||
if( get_magic_quotes_gpc() ) {
|
||||
$code = stripslashes($GLOBALS['__POST']["code"]);
|
||||
}
|
||||
else {
|
||||
$code = $GLOBALS['__POST']["code"];
|
||||
}
|
||||
public static function savefile($file_name) { // save edited file
|
||||
$code = $GLOBALS['__POST']["code"];
|
||||
$langs = $GLOBALS["language"];
|
||||
if ($langs == "japanese"){
|
||||
$_encoding = $GLOBALS['__POST']["file_encoding"];
|
||||
|
|
|
@ -38,7 +38,7 @@ if( ! defined( '_JEXEC' ) && ! defined( '_VALID_MOS' ) )
|
|||
*/
|
||||
class ext_Extract extends ext_Action {
|
||||
|
||||
function execAction( $dir, $item ) {
|
||||
public static function execAction( $dir, $item ) {
|
||||
|
||||
if( ! ext_isArchive( $item ) ) {
|
||||
ext_Result::sendResult( 'archive', false, $item.': '.ext_Lang::err( 'extract_noarchive' ) ) ;
|
||||
|
|
|
@ -84,14 +84,18 @@ function get_abs_dir($dir) { // get absolute path
|
|||
return $realpath;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
function get_abs_item($dir, $item) { // get absolute file+path
|
||||
function get_abs_item($dir, $item, $useFullPath = false) { // get absolute file+path
|
||||
if( is_array( $item )) {
|
||||
// FTP Mode
|
||||
$abs_item = '/' . get_abs_dir($dir)."/".$item['name'];
|
||||
if( get_is_dir($item)) $abs_item.='/';
|
||||
return extPathName($abs_item);
|
||||
}
|
||||
return extPathName( get_abs_dir($dir)."/".basename($item) );
|
||||
if(empty($dir) && $useFullPath){
|
||||
return extPathName(get_abs_dir($dir).$item);
|
||||
}else{
|
||||
return extPathName( get_abs_dir($dir)."/".basename($item) );
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Returns the LS info array from an ftp directory listing
|
||||
|
@ -152,7 +156,7 @@ function get_file_perms( $item) { // file permissions
|
|||
if( ext_isFTPMode() && isset($item['rights']) ) {
|
||||
$perms = decoct( bindec( decode_ftp_rights($item['rights']) ) );
|
||||
return $perms;
|
||||
} elseif( is_numeric($item['mode'])) { //SFTP
|
||||
} elseif(is_array($item) && is_numeric($item['mode'])) { //SFTP
|
||||
return @decoct($item['mode'] & 0777);
|
||||
}
|
||||
return @decoct(@fileperms( $item ) & 0777);
|
||||
|
@ -174,13 +178,13 @@ function parse_file_perms($mode) { // parsed file permisions
|
|||
$parsed_mode="";
|
||||
for($i=0;$i<3;$i++) {
|
||||
// read
|
||||
if(($mode{$i} & 04)) $parsed_mode .= "r";
|
||||
if(($mode[$i] & 04)) $parsed_mode .= "r";
|
||||
else $parsed_mode .= "-";
|
||||
// write
|
||||
if(($mode{$i} & 02)) $parsed_mode .= "w";
|
||||
if(($mode[$i] & 02)) $parsed_mode .= "w";
|
||||
else $parsed_mode .= "-";
|
||||
// execute
|
||||
if(($mode{$i} & 01)) $parsed_mode .= "x";
|
||||
if(($mode[$i] & 01)) $parsed_mode .= "x";
|
||||
else $parsed_mode .= "-";
|
||||
}
|
||||
return $parsed_mode;
|
||||
|
@ -672,7 +676,7 @@ function ext_selectList($name, $value, $arr, $size=1, $multiple="", $extra="") {
|
|||
if( !empty( $arr ) ) {
|
||||
$html = "<select class=\"inputbox\" name=\"$name\" id=\"$name\" size=\"$size\" $multiple $extra>\n";
|
||||
|
||||
while (list($key, $val) = each($arr)) {
|
||||
foreach($arr as $key => $val){
|
||||
$selected = "";
|
||||
if( is_array( $value )) {
|
||||
if( in_array( $key, $value )) {
|
||||
|
@ -1198,9 +1202,7 @@ function extGetParam( &$arr, $name, $def=null, $mask=0 ) {
|
|||
}
|
||||
|
||||
// account for magic quotes setting
|
||||
if (!get_magic_quotes_gpc()) {
|
||||
$return = stripslashes( $return );
|
||||
}
|
||||
$return = stripslashes( $return );
|
||||
}
|
||||
|
||||
return $return;
|
||||
|
|
|
@ -48,13 +48,13 @@ function make_list(&$_list1, &$_list2) {
|
|||
}
|
||||
|
||||
if (is_array($list1)) {
|
||||
while (list($key, $val) = each($list1)) {
|
||||
foreach($list1 as $key => $val) {
|
||||
$list[$key] = $val;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($list2)) {
|
||||
while (list($key, $val) = each($list2)) {
|
||||
foreach($list2 as $key => $val) {
|
||||
$list[$key] = $val;
|
||||
}
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ function send_dircontents($dir, $sendWhat = 'files') { // print table of files
|
|||
$list = $output_array;
|
||||
}
|
||||
|
||||
while(list($item,$info) = each($list)) {
|
||||
foreach($list as $item => $info) {
|
||||
// link to dir / file
|
||||
if (is_array($info)) {
|
||||
|
||||
|
@ -376,7 +376,7 @@ function send_dircontents($dir, $sendWhat = 'files') { // print table of files
|
|||
}
|
||||
class ext_List extends ext_Action {
|
||||
|
||||
function execAction($dir, $item='') { // list directory contents
|
||||
public static function execAction($dir, $item='') { // list directory contents
|
||||
global $dir_up, $mosConfig_live_site, $_VERSION;
|
||||
|
||||
$allow = ($GLOBALS["permissions"]&01) == 01;
|
||||
|
|
|
@ -78,7 +78,11 @@ function login() {
|
|||
exit();
|
||||
}
|
||||
|
||||
echo "<p style='color: red; text-align: center;'>Unauthorized. Please login to the <a href='../' style='color: black;'>EHCP panel</a> and try again.</p>";
|
||||
if(!isset($_SESSION['FTP_HOME_PATH']) || empty($_SESSION['FTP_HOME_PATH'])){
|
||||
echo "<p style='color: red; text-align: center;'>Please <a href='../index.php?op=addDomainToThisPaneluser'>add a domain to your EHCP account</a> before using extplorer.";
|
||||
}else{
|
||||
echo "<p style='color: red; text-align: center;'>Unauthorized. Please login to the <a href='../'>EHCP panel</a> and try again.</p>";
|
||||
}
|
||||
define( '_LOGIN_REQUIRED', 1 );
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ if( !defined( '_JEXEC' ) && !defined( '_VALID_MOS' ) ) die( 'Restricted access'
|
|||
*/
|
||||
class ext_Mkitem extends ext_Action {
|
||||
|
||||
function execAction($dir, $item="") { // make new directory or file
|
||||
public static function execAction($dir, $item="") { // make new directory or file
|
||||
if(($GLOBALS["permissions"]&01)!=01) ext_Result::sendResult( 'mkitem', false, $GLOBALS["error_msg"]["accessfunc"]);
|
||||
|
||||
if( extGetParam($_POST,'confirm') == 'true') {
|
||||
|
|
|
@ -37,7 +37,7 @@ if( !defined( '_JEXEC' ) && !defined( '_VALID_MOS' ) ) die( 'Restricted access'
|
|||
*/
|
||||
class ext_Rename extends ext_Action {
|
||||
|
||||
function execAction($dir, $item) { // rename directory or file
|
||||
public static function execAction($dir, $item) { // rename directory or file
|
||||
|
||||
if(($GLOBALS["permissions"]&01)!=01) {
|
||||
ext_Result::sendResult('rename', false, $GLOBALS["error_msg"]["accessfunc"]);
|
||||
|
|
|
@ -35,14 +35,13 @@ if( !defined( '_JEXEC' ) && !defined( '_VALID_MOS' ) ) die( 'Restricted access'
|
|||
*/
|
||||
|
||||
class ext_Transfer extends ext_Action {
|
||||
var $_downloadMethods;
|
||||
|
||||
function execAction( $dir, $item="" ) {
|
||||
public static function execAction( $dir, $item="" ) {
|
||||
|
||||
if(($GLOBALS["permissions"]&01)!=01) {
|
||||
ext_Result::sendResult('upload', false, $GLOBALS["error_msg"]["accessfunc"]);
|
||||
}
|
||||
$this->_downloadMethods = array(
|
||||
$downloadMethods = array(
|
||||
new CurlDownloader(),
|
||||
new WgetDownloader(),
|
||||
new FopenDownloader(),
|
||||
|
@ -57,7 +56,7 @@ class ext_Transfer extends ext_Action {
|
|||
}
|
||||
$cnt=count($GLOBALS['__POST']['userfile']);
|
||||
$err=false;
|
||||
foreach($this->_downloadMethods as $method ) {
|
||||
foreach($downloadMethods as $method ) {
|
||||
if( $method->isSupported()) {
|
||||
$downloader =& $method;
|
||||
break;
|
||||
|
@ -427,4 +426,4 @@ function getBinaryPath($binaryName) {
|
|||
|
||||
return false;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -36,7 +36,7 @@ if( !defined( '_JEXEC' ) && !defined( '_VALID_MOS' ) ) die( 'Restricted access'
|
|||
*/
|
||||
class ext_Upload extends ext_Action {
|
||||
|
||||
function execAction($dir, $item="") {
|
||||
public static function execAction($dir, $item="") {
|
||||
|
||||
if(($GLOBALS["permissions"]&01)!=01) {
|
||||
ext_Result::sendResult('upload', false, ext_Lang::err('accessfunc'));
|
||||
|
|
|
@ -37,7 +37,7 @@ if( !defined( '_JEXEC' ) && !defined( '_VALID_MOS' ) ) die( 'Restricted access'
|
|||
*/
|
||||
class ext_View extends ext_Action {
|
||||
|
||||
function execAction($dir, $item) { // show file contents
|
||||
public static function execAction($dir, $item) { // show file contents
|
||||
global $action;
|
||||
$item = basename($item);
|
||||
if(in_array(".".strtolower(pathinfo($item,PATHINFO_EXTENSION )), $GLOBALS["images_ext"])) {
|
||||
|
|
|
@ -14,7 +14,7 @@ if(function_exists ('jimport')){
|
|||
}
|
||||
if(!function_exists ('com_install')){
|
||||
function com_install($mypath =''){
|
||||
error_reporting( E_ALL ^ E_NOTICE );
|
||||
//error_reporting(0);
|
||||
global $database;
|
||||
|
||||
if( is_callable( array( 'JFactory', 'getDBO' ))) {
|
||||
|
|
|
@ -466,7 +466,7 @@ class Auth {
|
|||
{
|
||||
$storage_class = 'Auth_Container_' . $driver;
|
||||
include_once 'Auth/Container/' . $driver . '.php';
|
||||
$obj =& new $storage_class($options);
|
||||
$obj = new $storage_class($options);
|
||||
return $obj;
|
||||
}
|
||||
|
||||
|
@ -492,15 +492,11 @@ class Auth {
|
|||
|
||||
if ( isset($this->post[$this->_postUsername])
|
||||
&& $this->post[$this->_postUsername] != '') {
|
||||
$this->username = (get_magic_quotes_gpc() == 1
|
||||
? stripslashes($this->post[$this->_postUsername])
|
||||
: $this->post[$this->_postUsername]);
|
||||
$this->username = $this->post[$this->_postUsername];
|
||||
}
|
||||
if ( isset($this->post[$this->_postPassword])
|
||||
&& $this->post[$this->_postPassword] != '') {
|
||||
$this->password = (get_magic_quotes_gpc() == 1
|
||||
? stripslashes($this->post[$this->_postPassword])
|
||||
: $this->post[$this->_postPassword] );
|
||||
$this->password = $this->post[$this->_postPassword];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ class Console_Getopt
|
|||
}
|
||||
|
||||
reset($args);
|
||||
while (list($i, $arg) = each($args)) {
|
||||
foreach($args as $i => $arg) {
|
||||
/* The special element '--' means explicit end of
|
||||
options. Treat the rest of the arguments as non-options
|
||||
and end the loop. */
|
||||
|
@ -213,7 +213,7 @@ class Console_Getopt
|
|||
if ($i + 1 < strlen($arg)) {
|
||||
$opts[] = array($opt, substr($arg, $i + 1));
|
||||
break;
|
||||
} else if (list(, $opt_arg) = each($args)) {
|
||||
} else if (($opt_arg = reset($args))) {
|
||||
/* Else use the next argument. */;
|
||||
if (Console_Getopt::_isShortOpt($opt_arg)
|
||||
|| Console_Getopt::_isLongOpt($opt_arg)) {
|
||||
|
@ -308,7 +308,7 @@ class Console_Getopt
|
|||
if (substr($long_opt, -2) != '==') {
|
||||
/* Long option requires an argument.
|
||||
Take the next argument if one wasn't specified. */;
|
||||
if (!strlen($opt_arg) && !(list(, $opt_arg) = each($args))) {
|
||||
if (!strlen($opt_arg) && !($opt_arg = reset($args))) {
|
||||
$msg = "Console_Getopt: option requires an argument --$opt";
|
||||
return PEAR::raiseError($msg);
|
||||
}
|
||||
|
@ -357,4 +357,4 @@ class Console_Getopt
|
|||
return $argv;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue