Compare commits

...

393 commits

Author SHA1 Message Date
earnolmartin
9aee86f2bf Allow Larger Upload File Sizes 2024-04-09 18:26:17 -06:00
earnolmartin
453a8f9167 Allow Larger Upload File Sizes 2024-04-09 18:25:23 -06:00
earnolmartin
66a9f62eda Tabs in Custom Edit Subdomain Template 2024-01-30 19:31:37 -07:00
earnolmartin
b20b4996f0 Removal of Subdomain Nginx Image Pagespeed Configuration Code from Templates 2024-01-30 18:14:06 -07:00
earnolmartin
56c5fdab11 Use ehcpforce.tk IP service 2024-01-23 19:37:11 -07:00
earnolmartin
cba950c39c GitHub Killed Subversion (SVN) Support - Thank You For Breaking Stuff Per the Usual Microsoft 2024-01-23 18:56:28 -07:00
earnolmartin
cce0c89ebd Also Update Let's Encrypt Paths if Moving Domain to Another Account 2023-12-11 18:10:25 -07:00
earnolmartin
d38ac0c957 Email Forwarder / Inbox Additioanl Validation 2023-11-22 18:02:48 -07:00
earnolmartin
9ab835fdfd Email Forwarder / Inbox Additioanl Validation 2023-11-22 18:02:13 -07:00
earnolmartin
26508518fc Email Forwarder / Inbox Additioanl Validation 2023-11-22 18:01:28 -07:00
earnolmartin
fd72dab6b0 Allow Tabbing on Global Custom Templates as Well 2023-11-09 09:03:58 -07:00
earnolmartin
099a00236a Disable Annoying Daemon Restart Dialog 2023-10-25 12:50:03 -06:00
earnolmartin
014d5c2391 Disable Annoying Daemon Restart Dialog 2023-10-25 12:48:45 -06:00
earnolmartin
cb0a947e4c Disable Annoying Daemon Restart Dialog 2023-10-25 12:29:26 -06:00
earnolmartin
f715b7e53d Keep Kernel Update Notices from Stopping Install 2023-10-23 18:40:30 -06:00
earnolmartin
10b909024d Respect Selected Webserver Mode 2023-10-23 18:28:36 -06:00
earnolmartin
2fa704e1f7 Respect Selected Webserver Mode 2023-10-23 18:27:56 -06:00
earnolmartin
0c256a036a Respect Selected Webserver Mode 2023-10-23 17:06:22 -06:00
earnolmartin
f0f7475dc3 Respect Selected Webserver Mode 2023-10-23 16:35:03 -06:00
earnolmartin
372edce6ca Respect Selected Webserver Mode 2023-10-23 16:16:58 -06:00
earnolmartin
72dfd235ae Respect Selected Webserver Mode 2023-10-23 16:05:44 -06:00
earnolmartin
b20745dfd4 Set Config Properly Based on Web Server Type 2023-10-23 15:36:00 -06:00
earnolmartin
5cb246442f Prompt for webserver being nginx or apache2 2023-10-23 15:23:27 -06:00
earnolmartin
9bf70dcd58 Install nginx by default if passed in nginx argument 2023-10-23 15:17:57 -06:00
earnolmartin
d23172ab41 Default Symlink Handling Apache Change 2023-10-23 14:42:12 -06:00
earnolmartin
5cd25df190 Remove sites-enabled symlink since EHCP Force uses its own templates, and this file no longer is a symlink later, so it should not be a symlink right off the bat 2023-10-23 14:31:19 -06:00
earnolmartin
2c14ac8062 Use Sequential Bind DNS Serial for Domains 2023-10-07 13:01:02 -06:00
earnolmartin
a49781bb17 Run Check Tables on Start 2023-10-07 12:38:51 -06:00
earnolmartin
743cc2e13a Run Check Tables on Start 2023-10-07 12:31:41 -06:00
earnolmartin
2f2567645a Run Check Tables on Start 2023-10-07 12:25:35 -06:00
earnolmartin
2a9676d8ba Use Sequential Bind DNS Serial for Domains 2023-10-07 12:08:38 -06:00
earnolmartin
47939b670f Handle setting timezone for the server 2023-09-21 15:24:08 -06:00
earnolmartin
1cefb7c00b Make Sure rsyslog Is Installed 2023-08-09 13:25:01 -06:00
earnolmartin
fb4acf472b Use Python3 Scripts for Newer Operating Systems 2023-08-09 11:53:52 -06:00
earnolmartin
2d8fe68344 Use Python3 Scripts for Newer Operating Systems 2023-08-09 11:16:34 -06:00
earnolmartin
9b0f0260d7 Python3 PAM Modules Added 2023-08-09 11:01:56 -06:00
earnolmartin
0a0f7ea77f Formatted Documents Using PHP Formatter 2023-07-14 15:07:52 -06:00
earnolmartin
8edf174554 Subdomain has 404 error page as well 2023-07-13 14:57:00 -06:00
earnolmartin
ac73a36a1f Updated Squirrel Mail for php8 2023-07-13 14:08:45 -06:00
earnolmartin
093e02d563 Better Default Domain Pages 2023-07-13 13:31:59 -06:00
earnolmartin
bfe8271e6e PHP 8.x Fixes 2023-07-13 12:58:54 -06:00
earnolmartin
1224aa7aed Update hosts file on server ip change 2023-07-13 11:38:35 -06:00
earnolmartin
9970f95884 Enable Tabs in Templates When Editing in Panel 2023-07-13 11:22:06 -06:00
earnolmartin
dc55928411 Beautified nginx / apache templates 2023-07-13 10:51:50 -06:00
earnolmartin
458cba3372 Updated nginx Templates for Better Matches / Alias 2023-07-12 23:53:44 -06:00
earnolmartin
50c92f1ff1 Updated nginx Templates for Better Matches / Alias 2023-07-12 23:49:10 -06:00
earnolmartin
dbd7a224f8 Minor Changes 2023-07-11 21:01:11 -06:00
earnolmartin
ffd8baabe0 Minor Changes 2023-07-11 21:00:34 -06:00
earnolmartin
df25d55a36 Minor Changes 2023-07-11 19:55:49 -06:00
earnolmartin
b4aa9ae324 Minor Changes 2023-07-11 18:03:03 -06:00
earnolmartin
08d2af63ad Minor Changes 2023-07-11 16:55:01 -06:00
earnolmartin
697439b26b Minor Changes 2023-07-11 16:54:09 -06:00
earnolmartin
eee6dc3314 Minor Changes 2023-07-11 16:32:29 -06:00
earnolmartin
6c014bb6ee Python 2 Still Needed 2023-07-11 16:13:22 -06:00
earnolmartin
58b5788df4 Python 2 Still Needed 2023-07-11 14:57:46 -06:00
earnolmartin
9ef8c3d476 Minor Fixes 2023-07-11 14:17:56 -06:00
earnolmartin
2390a43e64 Minor Fixes 2023-07-11 14:16:55 -06:00
earnolmartin
212aa8c68b Use GeoIP for Webalizer 2023-02-27 11:26:51 -07:00
earnolmartin
cd9d77bc56 Minor Fixes for Ubuntu 14.04 Legacy 2023-02-07 11:00:03 -07:00
earnolmartin
7ffe27067c Allow Hostnames as Target for Backup Server & New Test Functions 2023-02-06 13:45:49 -07:00
earnolmartin
a116bf5e19 Allow Hostnames as Target for Backup Server & New Test Functions 2023-02-06 13:23:45 -07:00
earnolmartin
0901b9fa6d Allow Hostnames as Target for Backup Server & New Test Functions 2023-02-06 13:22:08 -07:00
earnolmartin
5ac9be0ff8 Added CCTLDs Check Using CSV From https://github.com/gavingmiller/second-level-domains 2023-02-04 19:59:42 -07:00
earnolmartin
867a904f13 Added Admin Impersonation 2023-01-17 10:24:17 -07:00
earnolmartin
3b184b115b Remove Let's Encrypt Certs for Subdomains as well if Domain SSL Settings Are Reset 2023-01-09 15:53:23 -07:00
earnolmartin
a707fdd2d8 Remove Let's Encrypt Certs of SSL is Reset 2023-01-09 15:36:20 -07:00
earnolmartin
abe620d4b4 www should be appended to domain unless it starts with www. (which it shouldn't, but just in case) 2023-01-09 15:21:13 -07:00
earnolmartin
c50ac727cb Minor Fixes 2022-12-06 11:31:59 -07:00
earnolmartin
1a0d128d9f Global Redirect Template Added 2022-12-06 10:50:39 -07:00
earnolmartin
204c283a5c Fixes for Ubuntu 22.04+ 2022-10-24 15:22:15 -06:00
earnolmartin
51704f2f06 Fixes for Debian 2022-10-24 15:14:28 -06:00
earnolmartin
8e7493b33d Do not use hashlib from pip 2022-10-24 13:57:29 -06:00
earnolmartin
d4bb5485b6 pip2 additional checks 2022-10-24 13:00:53 -06:00
earnolmartin
100f8f8c64 Do not use hashlib from pip 2022-10-24 12:31:54 -06:00
earnolmartin
fb9dac63ac Fix for Ubuntu 22.04 - Bind additional-from-cache option 'additional-from-cache' no longer exists 2022-10-24 10:15:49 -06:00
earnolmartin
8f42070647 Updates for Ubuntu 22.04 2022-08-06 14:12:24 -06:00
earnolmartin
d36000754c Prompt to skip installation of certain components on future runs 2022-08-04 10:04:46 -06:00
earnolmartin
053e3772f0 Skip Bind Options Tweaking if Skip File Exists 2022-07-09 21:48:38 -06:00
earnolmartin
a927c7a2f2 Minor Fix 2022-04-25 18:22:17 -06:00
earnolmartin
4c89fa75fb Minor Fix 2022-04-25 16:58:35 -06:00
earnolmartin
062cbc21a6 PHP 8 Changes 2022-04-21 15:47:08 -06:00
earnolmartin
5c39a4b3f2 PHP 8 Changes 2022-04-21 15:12:18 -06:00
earnolmartin
c861c8184e PHP 8 Changes 2022-04-21 13:50:21 -06:00
earnolmartin
5ee013353e PHP 8 Changes 2022-04-21 13:17:46 -06:00
earnolmartin
4e67ac117a PHP 8 Changes 2022-04-21 12:47:58 -06:00
earnolmartin
9766bdc39e PHP 8 Changes 2022-04-21 12:46:54 -06:00
earnolmartin
5c7ac05670 PHP 8 Changes 2022-04-21 12:12:16 -06:00
earnolmartin
948d80e418 PHP 8 Fixes 2022-04-21 09:45:33 -06:00
earnolmartin
bd9b943f99 PHP 8 Compatibility Changes 2022-04-20 14:25:47 -06:00
earnolmartin
fb32c8f965 Minor Change 2022-04-20 14:18:16 -06:00
earnolmartin
bf80eca6ae Ubuntu 22.04 Fixes 2022-04-20 13:24:32 -06:00
earnolmartin
7af472d420 Ubuntu 22.04 Fixes 2022-04-20 13:23:54 -06:00
earnolmartin
220c781336 Ubuntu 22.04 Fixes 2022-04-20 13:10:38 -06:00
earnolmartin
84bfe8520a PHP 8 Compatibility Changes 2022-04-20 12:59:36 -06:00
earnolmartin
192bea0f5a PHP 8 Compatibility Changes 2022-04-20 12:57:51 -06:00
earnolmartin
5fedbe0304 PHP 8 Compatibility Changes 2022-04-20 12:54:37 -06:00
earnolmartin
39eea135dc PHP 8 Compatibility Changes 2022-04-20 12:44:40 -06:00
earnolmartin
685109ec7e Minor Change 2022-04-20 12:24:43 -06:00
earnolmartin
5a0f0dc335 Debian 11 and Ubuntu 22.04 Fixes 2022-04-20 12:15:13 -06:00
earnolmartin
5596025da2 Ubuntu 14.04 Post EOL Fixes 2022-02-28 12:05:38 -07:00
earnolmartin
9aa60afe70 Ubuntu 14.04 Post EOL Fixes 2022-02-28 11:52:49 -07:00
earnolmartin
a7552fb4fa Ubuntu 14.04 Post EOL Fixes 2022-02-28 11:38:54 -07:00
earnolmartin
6519ed74b9 Ubuntu 14.04 Post EOL Fixes 2022-02-28 11:33:16 -07:00
earnolmartin
57bd0539d8 Ubuntu 14.04 Post EOL Fixes 2022-02-28 11:28:37 -07:00
earnolmartin
d402f379fd Ubuntu 14.04 Post EOL Fixes 2022-02-28 11:15:03 -07:00
earnolmartin
7daac867fe Ubuntu 14.04 Post EOL Fixes 2022-02-28 11:01:46 -07:00
earnolmartin
42b0970984 Fixes 2022-02-28 10:03:50 -07:00
earnolmartin
b5af73ce3a Fixes 2022-02-28 10:01:32 -07:00
earnolmartin
8676206564 Make Sure to Enable the Web Server 2022-02-18 14:12:30 -07:00
earnolmartin
346b4e5f5b Added Add Line if Not Exists Function 2022-02-18 13:19:30 -07:00
earnolmartin
c3952d5c19 Postfix Fixes and Auto Response Fixes 2022-02-18 12:08:19 -07:00
earnolmartin
13aff94012 Disable Cloud Init 2022-01-31 17:37:08 -07:00
earnolmartin
ca119ad126 Added .csv to mime.types for nginx 2022-01-31 14:21:51 -07:00
earnolmartin
e6df2d7946 Fixes and Timezone MySQL Import During Install 2022-01-25 17:40:44 -07:00
earnolmartin
f2d43d3b27 .well-known directory should not be password protected for let's encrypt 2021-12-26 11:28:52 -07:00
earnolmartin
56fb349d12 German Changes 2021-10-27 15:44:52 -06:00
earnolmartin
d21502b469 Fixed Template Issue 2021-10-27 13:49:39 -06:00
earnolmartin
0b5a65fbb8 German Template Files 2021-10-27 13:25:19 -06:00
earnolmartin
5ab6aa8a60 Testing German Translation 2021-10-26 18:32:34 -06:00
earnolmartin
816e465f7c Added Variables Directives for nginx 2021-09-27 09:56:00 -06:00
earnolmartin
8b92b368d7 Picante UI Fix 2021-08-16 09:27:10 -06:00
earnolmartin
460277d532 Picante UI Fix 2021-08-16 09:08:13 -06:00
earnolmartin
16eeab86c0 Max 10 Seconds for Geo Database for Webalizer 2021-08-16 09:05:22 -06:00
earnolmartin
82f4c410e9 Max 2 Tries for Geo Database for Webalizer 2021-08-16 08:55:36 -06:00
earnolmartin
64691b8e7d Template Changes for UI 2021-08-16 08:45:44 -06:00
earnolmartin
f54fe7460f UI Cleanup and Picante Theme Changes 2021-08-16 01:56:39 -06:00
earnolmartin
3a5091de80 UI Cleanup and Picante Theme Changes 2021-08-16 01:52:11 -06:00
earnolmartin
3a106f4e8a UI Cleanup and Picante Theme Changes 2021-08-16 01:51:24 -06:00
earnolmartin
a14ae8ea64 Cleanup for Debian Apache2 2021-05-19 12:23:40 -06:00
earnolmartin
6e3348b3f7 Cleanup for Debian Apache2 2021-05-19 12:22:23 -06:00
earnolmartin
e36a9b7edd Minor Fixes 2021-04-16 11:05:55 -06:00
earnolmartin
1764f2d23f Fixed Python 2 Download Script Location AGAIN 2021-04-13 16:32:00 -06:00
earnolmartin
9e4e59cc26 Added More IP Lookup Services 2021-03-23 09:53:27 -06:00
earnolmartin
6e09cf25fd Update Webalizer GeoDB 2021-03-06 15:07:38 -07:00
earnolmartin
04b73cbf0f Update Webalizer GeoDB 2021-03-06 15:02:25 -07:00
earnolmartin
f4c181efa9 Update Webalizer GeoDB 2021-03-06 14:59:24 -07:00
earnolmartin
6fc6261995 Python 2 Fixes 2021-03-05 18:11:01 -07:00
earnolmartin
d2342c4218 Added Custom Defined User Scripts Run Post Install and Post Update 2021-03-04 09:49:43 -07:00
earnolmartin
04014628fb Changed Wording 2021-03-03 15:14:56 -07:00
earnolmartin
7247b6d782 Globals Fix 2021-03-03 15:09:33 -07:00
earnolmartin
a51be327ca Fixes 2021-03-03 15:01:58 -07:00
earnolmartin
1a545e8560 Fixes 2021-03-03 14:57:11 -07:00
earnolmartin
99f55598ab Allow Editing of Custom Configs for All Web Server Types and Modes 2021-03-03 14:40:40 -07:00
earnolmartin
2bc724c549 Allow Editing of Custom Configs for All Web Server Types and Modes 2021-03-03 14:39:17 -07:00
earnolmartin
f2c4b4933c More Info 2021-03-03 14:14:30 -07:00
earnolmartin
c0de65e8ff More Info 2021-03-03 13:55:27 -07:00
earnolmartin
e1705129e8 More Info 2021-03-03 13:49:51 -07:00
earnolmartin
347a9751da More Info 2021-03-03 13:46:33 -07:00
earnolmartin
be9029cccb Minor Change 2021-02-26 16:27:46 -07:00
earnolmartin
2eded1cbbd Fixes for Certain Lets Encrypt Certbot Issues 2021-02-26 15:58:25 -07:00
earnolmartin
680df73a6a Minor Fix 2021-02-26 15:28:17 -07:00
earnolmartin
5e44094472 minor change 2021-02-08 15:41:23 -07:00
earnolmartin
dbb1872f2b nginx template updates and bot blocking included by default 2021-02-08 14:40:12 -07:00
earnolmartin
9f79067159 Minor Change 2020-12-01 11:13:44 -07:00
earnolmartin
1d9fdcbec0 Fixes for Debian and Minor Enhancements 2020-11-24 17:02:31 -07:00
earnolmartin
0eae628054 Lock Down PHP FPM Pools 2020-11-14 16:11:53 -07:00
earnolmartin
567cebe8d5 Security Enhancements 2020-11-14 13:00:58 -07:00
earnolmartin
0036523bfd Security Enhancements 2020-11-14 12:59:20 -07:00
earnolmartin
ebd48501c4 Added bc Dependency 2020-11-04 15:18:15 -07:00
earnolmartin
2178cd6f4d More Fixes for 16.04 2020-10-26 11:01:45 -06:00
earnolmartin
42edfd39a6 Fix for Ubuntu 16.04 due to Python Path Bug Being Backported All the Way to 16 2020-10-26 10:17:58 -06:00
earnolmartin
860d582944 Fix for Ubuntu 18.04 VSFTPD and SMTP for Broken Packages Backported from Ubuntu 20.04 2020-09-26 13:39:57 -06:00
earnolmartin
94a9748fe1 Remove MrUnix.net Dependency 2020-08-26 10:28:33 -06:00
earnolmartin
ebcfb1dea0 Extplorer Fixes PHP 7.4.x 2020-05-13 14:04:34 -06:00
earnolmartin
5194fa8bee Extplorer Fixes PHP 7.4.x 2020-05-13 13:27:44 -06:00
earnolmartin
e552c6976e Syntax Fix 2020-05-13 12:55:55 -06:00
earnolmartin
71cdee0b5f Fix Package Installation Repo Check 2020-05-13 12:31:27 -06:00
earnolmartin
a225a79479 Updated Certbot Install for Ubuntu 20.04 and Newer 2020-05-13 12:19:48 -06:00
earnolmartin
267169c989 Apache EHCP Template Changes and Symlink Fixes 2020-05-06 12:35:15 -06:00
earnolmartin
fa627f61b9 Apache EHCP Template Changes and Symlink Fixes 2020-05-06 12:33:33 -06:00
earnolmartin
db1bcf9df5 extplorer ehcp template changes 2020-05-06 09:59:50 -06:00
earnolmartin
d12b7c9669 Minor Change for Adding New MySQL User to Existing Database 2020-05-05 23:22:44 -06:00
earnolmartin
069290fd7a Minor Fixes 2020-03-25 22:42:30 -06:00
earnolmartin
6ecdd7c083 Minor Fixes 2020-03-25 22:34:33 -06:00
earnolmartin
48d45765e2 Minor Fixes 2020-03-25 22:21:44 -06:00
earnolmartin
c55c8071fb Handle Manual pip Install for Python and Ubuntu 20+ Scripts Added 2020-03-25 21:36:41 -06:00
earnolmartin
f0debbb7da Undo of PAM Auth Changes Previously Required for Ubuntu 20.04 2020-03-25 15:06:33 -06:00
earnolmartin
af3b8e6304 Not Needed - PHP Errors Already Logged in /var/log/php_errors.log 2020-03-20 15:42:02 -06:00
earnolmartin
781c8fe415 Fix 2020-03-20 15:38:15 -06:00
earnolmartin
0c03c0e90a Log PHP-FPM Output 2020-03-20 15:23:40 -06:00
earnolmartin
9be8f47acf Minor Fix 2020-02-20 18:57:20 -07:00
earnolmartin
9a2272df33 Minor 2020-02-20 18:21:25 -07:00
earnolmartin
7d1a1770be Better Structure 2020-02-20 18:18:43 -07:00
earnolmartin
6f4d246ea9 Use Newer Version of Sendmail if Needed 2020-02-20 18:12:53 -07:00
earnolmartin
cf35cd96e6 Fixes for Ubuntu 20.04 2020-02-20 17:31:26 -07:00
earnolmartin
54cba1acbc Fixes for Ubuntu 20.04 2020-02-20 16:05:58 -07:00
earnolmartin
de0a608ab8 minor 2020-02-20 12:29:27 -07:00
earnolmartin
4da2fe1822 Minor Changes 2020-02-20 12:15:31 -07:00
earnolmartin
ceaf703741 Use Default Length 2020-02-20 12:02:36 -07:00
earnolmartin
92120798b1 Added PHPMyAdmin Fixes for Ubuntu 18.04 2019-12-18 18:01:24 -07:00
earnolmartin
d00b4d65ca Minor Changes 2019-12-18 16:41:06 -07:00
earnolmartin
d5b5969a96 Fixes for Panel User Deletion 2019-12-18 16:28:49 -07:00
earnolmartin
75d9a20ad1 Only Older OS for Webalizer Changes 2019-12-10 10:32:49 -07:00
earnolmartin
1c99135bf6 Minor Change 2019-12-10 10:22:14 -07:00
earnolmartin
0c3b79b9f8 Webalizer Use Latest GeoIP 2019-12-10 10:18:54 -07:00
earnolmartin
ee49ef4407 Fixes for Webalizer 2019-12-10 10:13:28 -07:00
earnolmartin
7d4bec6e94 Apply Webalizer Patch for https://bugs.launchpad.net/ubuntu/+source/webalizer/+bug/1399615 2019-12-10 10:04:15 -07:00
earnolmartin
bc9d17dba1 Added Webalizer Update Code 2019-12-10 09:45:48 -07:00
earnolmartin
5cc5a6fff6 Use Better Nginx Bad Bot Repository 2019-12-06 10:39:02 -07:00
earnolmartin
2c46fafb24 Prevent Duplicate Additions 2019-10-18 18:29:56 -06:00
earnolmartin
c16e138c15 Better for Debian 9 2019-10-18 14:18:21 -06:00
earnolmartin
bfcd57032b Fix for Debian 9 2019-10-18 13:54:06 -06:00
earnolmartin
6517a9e32b Update OpenSSL Config If Needed 2019-10-18 12:44:45 -06:00
earnolmartin
ee71315ceb Debian 10 Is Running A New Enough Apache2 Version By Default 2019-10-18 12:07:47 -06:00
earnolmartin
6bd7a12070 Fix for Debian 10 2019-10-17 22:38:28 -06:00
earnolmartin
5f06f75f36 Fixes for Debian 10 2019-10-17 22:11:56 -06:00
earnolmartin
0b5e8bef2c debian 10 fixes 2019-10-17 20:57:24 -06:00
earnolmartin
6a34f617f8 Debian 10 phpmyadmin start 2019-10-17 19:26:10 -06:00
earnolmartin
8af896c3e0 Fixes for sql_mode 2019-10-16 16:26:18 -06:00
earnolmartin
e1a4ef566d Minor Changes for Debian 9 2019-10-15 23:32:42 -06:00
earnolmartin
b77476ca02 Updates and Fixes to Installer and Updater 2019-10-15 13:07:19 -06:00
earnolmartin
9132d50428 Updates and Fixes to Installer and Updater 2019-10-15 11:57:24 -06:00
earnolmartin
cdb40cc045 Updates and Fixes to Installer and Updater 2019-10-15 11:53:21 -06:00
earnolmartin
ca2a2541cc Fixes for Newer Versions of MariaDB and MySQL Server 2019-10-15 09:12:36 -06:00
earnolmartin
0ff0682670 Fixes for Newer Versions of MariaDB and MySQL Server 2019-10-15 09:06:59 -06:00
earnolmartin
06945b90bc Fixed Status FTP Account Bug - Shouldn't Apply to Custom Accounts 2019-09-12 22:51:59 -06:00
earnolmartin
8a61cdb9bd Fixed Status FTP Account Bug - Shouldn't Apply to Custom Accounts 2019-09-12 22:47:59 -06:00
earnolmartin
285081d783 Fixed Status FTP Account Bug - Shouldn't Apply to Custom Accounts 2019-09-12 22:46:53 -06:00
earnolmartin
b9e5955da6 Fixed Status FTP Account Bug - Shouldn't Apply to Custom Accounts 2019-09-12 22:44:43 -06:00
earnolmartin
5758219d9a Minor Fix for Fail2Ban - Make Sure VSFTPD Log Exists 2019-09-09 14:08:14 -06:00
earnolmartin
fd3971ebfb Minor Fix for Sasl 2019-09-09 11:11:04 -06:00
earnolmartin
bd94b6a2a1 Fix for Fail2Ban 2019-09-02 10:44:08 -06:00
earnolmartin
0ed1ebd910 Trying to Keep Special Chars in Remote Backup Encryption Keys 2019-08-22 11:02:32 -06:00
earnolmartin
e21f03a600 Trying to Keep Special Chars in Remote Backup Encryption Keys 2019-08-22 10:56:17 -06:00
earnolmartin
84ea13c006 Added Panelusername Identifier to list of Domains for Resellers and Admin 2019-08-21 13:21:52 -06:00
earnolmartin
cb88bade9d Changes to Debian Detection 2019-07-24 12:00:00 -06:00
earnolmartin
18eb651a14 Changes to Debian Detection 2019-07-24 11:58:03 -06:00
earnolmartin
30f3e53111 Better Informational UI when Editing and Deleting Email Accounts 2019-06-18 14:42:57 -06:00
earnolmartin
3fe8a47805 Fixes to IT Picante Template 2019-06-05 11:51:00 -06:00
earnolmartin
ca7e8d9c92 Updated Italian Language in Picante 2019-06-03 21:27:06 -06:00
earnolmartin
44c9f09e6a Make sure we use 1024 bit key for DKIM 2019-05-31 11:27:32 -06:00
earnolmartin
b0b8be1501 Order domains by name 2019-05-23 14:37:26 -06:00
earnolmartin
9d9d720abd DKIM Fixes 2019-05-23 12:19:33 -06:00
earnolmartin
0a88912ffa Fixes 2019-05-23 09:54:22 -06:00
earnolmartin
1e6f9fe0d0 Fixes for DKIM 2019-05-22 16:42:42 -06:00
earnolmartin
ef3df1f9c6 Better DKIM Adjusting 2019-05-22 16:02:16 -06:00
earnolmartin
5b9e01cc86 Change Hostname Variable in Postfix for DKIM Too 2019-05-22 15:56:17 -06:00
earnolmartin
87078ffd80 DKIM Testing 2019-05-22 15:48:15 -06:00
earnolmartin
5fdd3b6655 Added Missing Files 2019-05-22 13:03:34 -06:00
earnolmartin
3ce26c15bb Added Italian to Picante Theme 2019-05-22 12:26:54 -06:00
earnolmartin
621535166c Added php_sessions main path to the cleanup as well 2019-05-10 17:48:25 -06:00
earnolmartin
61fb8f5f08 Handle Mixed Mode SSL - One Domain that Previously Didn't Have SSL in the Template Should Have it if Let's Encrypt or a Custom Cert Was Marked to Be Used 2019-05-10 13:35:38 -06:00
earnolmartin
3dfcbd9ed2 Remove Extra Line 2019-05-10 09:09:11 -06:00
earnolmartin
ee65c9563b Better Checking for FTP Success 2019-05-10 09:07:39 -06:00
earnolmartin
e312b4fd60 Minor Fix 2019-04-30 23:08:33 -06:00
earnolmartin
d57972a75d Minor Fix 2019-04-30 17:35:56 -06:00
earnolmartin
f97f13cb77 Fixes for Custom Templates Logic 2019-04-30 17:30:45 -06:00
earnolmartin
bc8eaf0485 Templates Should Still Respect SSLOnly Depending on Which Template Is Used 2019-04-30 16:48:24 -06:00
earnolmartin
e989f9b93d Minor Fix 2019-04-30 15:59:49 -06:00
earnolmartin
998fdba852 Minor Fix 2019-04-30 15:50:34 -06:00
earnolmartin
c9263f821e Cleanup of Unused 3rd Parties and Added Nginx Bad Bot Blocker 2019-04-30 15:46:30 -06:00
earnolmartin
40427bbc1b Fix in Restore Script 2019-04-29 19:54:01 -06:00
earnolmartin
797a47b547 Extra Debugging During Restore 2019-04-29 19:12:08 -06:00
earnolmartin
1943c35495 Add Path to Restore Script 2019-04-29 17:41:56 -06:00
earnolmartin
e80215a116 Fix in Restore PHP 2019-04-29 17:15:19 -06:00
earnolmartin
15f6fd9d1b Added Restore Script 2019-04-29 17:09:49 -06:00
earnolmartin
9e3db9ba0d SCP Log should Go In /var/log/bakcup_log.conf 2019-04-29 16:55:00 -06:00
earnolmartin
13948a2a44 Cleanup Happens Before Resync 2019-04-29 16:22:10 -06:00
earnolmartin
65874c6897 Added Restore Script 2019-04-29 14:04:30 -06:00
earnolmartin
ba63f60d9c Do Postfix Quota Fix only for Specific OS 2019-04-23 17:22:47 -06:00
earnolmartin
159b6c7c2c Update the IP Address When It Changes 2019-04-19 14:28:54 -06:00
earnolmartin
fe6da42f36 Rebuilt Crontab Post Restore 2019-04-16 19:13:08 -06:00
earnolmartin
4289762236 Lookup php-fpm package in case something goes wrong 2019-04-12 10:45:19 -06:00
earnolmartin
cde4cfac80 Fixes for Quota 2019-04-08 19:57:47 -06:00
earnolmartin
c91db0ca19 Minor Fix 2019-04-01 23:09:32 -06:00
earnolmartin
19aa03da0d Added TLS Postfix Cert Advanced Option and Postfix VDA Fixes for Ubuntu 18.04 2019-04-01 22:24:21 -06:00
earnolmartin
ac53cb1602 Minor Change 2019-01-30 22:47:51 -07:00
earnolmartin
88cd82a0af Fix owner on transfer for domains 2019-01-30 22:25:12 -07:00
earnolmartin
a6612a3a7c Minor Fix to Keep Compatibility 2019-01-30 08:58:25 -07:00
earnolmartin
4950eba573 Minor Fixes to Transfer Domain Functionality 2019-01-29 18:18:39 -07:00
earnolmartin
c1ee41d4da Minor Fixes to Transfer Domain Functionality 2019-01-29 17:48:18 -07:00
earnolmartin
22fe1c6754 Minor Fixes to Transfer Domain Functionality 2019-01-29 17:37:56 -07:00
earnolmartin
c2684960fb Minor Fixes to Transfer Domain Functionality 2019-01-29 17:34:59 -07:00
earnolmartin
3d87d28b79 Minor Fixes to Transfer Domain Functionality 2019-01-29 17:27:32 -07:00
earnolmartin
f66b23621f Minor Fixes to Transfer Domain Functionality 2019-01-29 17:23:57 -07:00
earnolmartin
34b65b07a0 Minor Fixes to Transfer Domain Functionality 2019-01-29 17:18:21 -07:00
earnolmartin
f6a2ddd1e4 Proper Domain Transfer Functionality to Another Account - Testing 2019-01-29 17:01:04 -07:00
earnolmartin
6e41618898 su directive needed in log rotate 2019-01-28 13:30:20 -07:00
earnolmartin
5993c69c3a Minor Changes 2019-01-28 11:43:01 -07:00
earnolmartin
4aed0f0ddd Add Subdomains to Log Rotate, Prevent Access to Subdomain Logs, and Minor Fixes 2019-01-28 11:22:37 -07:00
earnolmartin
33e43f19ca Use UTF8 and General CI 2019-01-25 11:57:45 -07:00
earnolmartin
98abf2ec92 Better Cleanup for Let's Encrypt 2019-01-23 16:31:15 -07:00
earnolmartin
f1add17362 Better Cleanup for Let's Encrypt 2019-01-23 16:17:20 -07:00
earnolmartin
9f424f4d15 Better Cleanup for Let's Encrypt 2019-01-23 16:00:57 -07:00
earnolmartin
93a7ca04e5 Fix for Let's Encrypt 2019-01-23 15:22:55 -07:00
earnolmartin
0fe536975e Minor Change to Custom FTP Accounts 2019-01-23 14:31:24 -07:00
earnolmartin
5ba2afc48e Minor Change for SSL Certs in Courier 2018-12-06 14:58:35 -07:00
earnolmartin
824fee720b Minor Tweaks 2018-11-28 22:15:11 -07:00
earnolmartin
0d409d3064 Add PHP Errors File to Log Rotate 2018-11-28 21:22:39 -07:00
earnolmartin
9fd4cdc426 Fix PHP error logging 2018-11-28 21:02:41 -07:00
earnolmartin
ac04d762af Fix PHP error logging 2018-11-28 20:50:30 -07:00
earnolmartin
0f6443b07e Minor Fix 2018-09-24 11:59:53 -06:00
earnolmartin
3e6817f7bb Minor Fix 2018-09-22 22:46:32 -06:00
earnolmartin
c0f00edc37 Minor UI Fixes 2018-09-10 12:45:46 -06:00
earnolmartin
c7fcba6fc2 Merge branch 'master' of github.com:earnolmartin/EHCP-Force-Edition 2018-09-10 11:35:54 -06:00
earnolmartin
2dc1d5ffa1 Support for Custom Subdomain Templates - Initial 2018-09-10 11:35:39 -06:00
earnolmartin
089efa3873 Minor Change 2018-08-24 19:47:07 -06:00
earnolmartin
44e21bef3e Fixes for Older Versions of Ubuntu and Debian 2018-08-24 16:26:51 -06:00
earnolmartin
e719cb9730 Fixes for Older Versions of Ubuntu and Debian 2018-08-24 15:54:06 -06:00
earnolmartin
dcfb844721 Minor Changes to DB Validation 2018-08-10 12:34:02 -06:00
earnolmartin
fc58d719e5 Minor Change 2018-08-09 19:11:17 -06:00
earnolmartin
a132cf9850 MySQL User Password HAS to Be Updated Too 2018-08-09 12:48:29 -06:00
earnolmartin
68a9af6d4f Minor Tweaks 2018-08-08 14:36:47 -06:00
earnolmartin
6283813159 Remote Access to Specified MySQL DB Fixes & Remote Grants Included in Backups Now 2018-08-01 10:56:56 -06:00
earnolmartin
4ac7bbe3fc Remote Access to Specified MySQL DB Fixes 2018-08-01 10:14:45 -06:00
earnolmartin
4a39cd8650 Troubleshoot Missing Let's Encrypt Ubuntu 18.04 2018-07-18 12:29:02 -06:00
earnolmartin
78929fa1b2 Troubleshoot Missing Let's Encrypt Ubuntu 18.04 2018-07-18 12:26:19 -06:00
earnolmartin
0066c5bc66 Fix for NGINX Mime Types on Install 2018-07-18 09:33:30 -06:00
earnolmartin
4f8b378184 Also SyncFTP Post Install 2018-07-16 12:26:41 -06:00
earnolmartin
6c7eaf41b0 Fix for Let's Encrypt Suffixes (https://community.letsencrypt.org/t/prevent-0001-xxxx-certificate-suffixes/66802/2) 2018-07-16 08:34:39 -06:00
earnolmartin
21d8922938 Handle IPv6 Connections PHPMyAdmin 2018-07-13 15:38:04 -06:00
earnolmartin
c60eb694a4 Changes to Generated SQL 2018-07-13 15:06:06 -06:00
earnolmartin
5143a65f5b Changes to Generated SQL 2018-07-13 14:51:10 -06:00
earnolmartin
6da1127bfc Changes to Generated SQL 2018-07-13 14:43:46 -06:00
earnolmartin
9d2cc24c84 Load Config Too 2018-07-13 13:48:59 -06:00
earnolmartin
6fa951289b Rebuild Webserver Configs as Well Post Restore 2018-07-13 13:41:49 -06:00
earnolmartin
55245b4eaf Generate SSL Files Must be Run in Commandline Mode 2018-07-13 13:26:29 -06:00
earnolmartin
d94ae2f7c5 Add Fixing of Missing SSL Cert to Constructor 2018-07-13 12:43:55 -06:00
earnolmartin
acb717a362 Enable SSL for Apache - Problem Ran Into on Debian 9 2018-07-13 12:41:20 -06:00
earnolmartin
48cacc9e30 Install net-tools 2018-07-13 12:17:21 -06:00
earnolmartin
abd5ee8165 Sync After Restore 2018-07-13 12:11:02 -06:00
earnolmartin
d38a4164e2 Do NOT Store EHCP Files By Default in Backups Since this Can Cause Problems on Restore (changed credentials) 2018-07-13 11:28:01 -06:00
earnolmartin
9f308e5972 Create /var/backup directory for restoring backups / storing backups by default 2018-07-13 11:11:02 -06:00
earnolmartin
5c6bdea910 Match Spacing in Install 2018-07-13 10:47:43 -06:00
earnolmartin
489fad2e64 Fixes to Prevent Multiple Include root_whitelist.php in PHPMyAdmin Config 2018-07-13 10:46:51 -06:00
earnolmartin
03000aa078 No Need to Regrant EHCP Perms on Backup https://stackoverflow.com/questions/8765307/do-i-maintain-create-rights-after-drop-database-in-mysql 2018-07-13 10:28:11 -06:00
earnolmartin
1216be27b6 Backup Fixes, Additional Database Name Validation, Minor Tweaks to Unattended Install, and More Minor Fixes 2018-07-13 10:02:45 -06:00
earnolmartin
7509e193cc Fix for Ubuntu 18.04 PHPMyAdmin Login Issue for root MySQL 2018-07-05 20:09:46 -06:00
earnolmartin
203fad5ec2 Reusable Adjusting Domains Template Code for Redirecting Non-SSL to SSL 2018-06-14 14:42:56 -06:00
earnolmartin
fe9397a7ba Reusable Adjusting Domains Template Code for Redirecting Non-SSL to SSL 2018-06-14 14:27:05 -06:00
earnolmartin
fb110601cc Reusable Adjusting Domains Template Code for Redirecting Non-SSL to SSL 2018-06-14 13:56:48 -06:00
earnolmartin
44c9cdca2e Reusable Adjusting Domains Template Code for Redirecting Non-SSL to SSL 2018-06-14 13:39:35 -06:00
earnolmartin
79fa810e2b Added .so Files to Mime Types for nginx 2018-06-05 12:50:18 -06:00
earnolmartin
314114c6f8 Fix on Some Servers 2018-06-04 19:31:15 -06:00
earnolmartin
f213b670d3 Add Web Server Type to Public Info Call 2018-05-25 16:39:02 -06:00
earnolmartin
4cc96920fb Minor Adjustments 2018-05-25 14:12:51 -06:00
earnolmartin
766462fb6f nginx consistency 2018-05-24 18:12:56 -06:00
earnolmartin
65dc92232e Match nginx PHP Matching & nginx fixes 2018-05-24 17:46:43 -06:00
earnolmartin
18b0900163 Revert "Match Nginx PHP Matching"
This reverts commit bba2b00278.
2018-05-24 17:11:59 -06:00
earnolmartin
9c80da1150 Merge branch 'master' of github.com:earnolmartin/EHCP-Force-Edition 2018-05-24 17:11:12 -06:00
earnolmartin
21fbeb090b Revert 2018-05-24 17:10:23 -06:00
earnolmartin
bba2b00278 Match Nginx PHP Matching 2018-05-24 16:52:41 -06:00
earnolmartin
fb3ff1aab8 Added additional customhttp to backup when using panel reset function 2018-05-24 15:09:55 -06:00
earnolmartin
04c8de92cc Fixes to EHCP Panel Template 2018-05-23 23:24:26 -06:00
earnolmartin
1d97fb019c FPM Changes 2018-05-23 21:26:45 -06:00
earnolmartin
47aad5e15e Fixes for Debian 8 and 9 2018-05-23 19:56:47 -06:00
earnolmartin
3a23bcb831 Fix for Debian 8 2018-05-23 19:53:26 -06:00
earnolmartin
2882684436 Syntax Error Fix 2018-05-23 19:29:48 -06:00
earnolmartin
255c786d59 Syntax Error Fix 2018-05-23 19:27:01 -06:00
earnolmartin
2d0bd40f5b Fixes for Debian 8 and 9 - Drop Support for Debian 7 and Lower 2018-05-23 19:04:36 -06:00
earnolmartin
91d69cb7c1 Fixes for Debian 2018-05-22 12:16:56 -06:00
earnolmartin
1788749c23 Fixes for Debian 2018-05-22 12:16:08 -06:00
earnolmartin
9689dc2277 Changes now that web server modes both use FPM 2018-05-22 11:23:00 -06:00
earnolmartin
af9bc8a31f Mod Security has New Package Name Ubuntu 18.04 2018-05-22 10:58:48 -06:00
earnolmartin
a408f2f828 Minor Changes to Install and Update Process 2018-05-22 10:22:25 -06:00
earnolmartin
9fed2b862a Include php-fpm Always On Status Page 2018-05-22 10:00:53 -06:00
earnolmartin
d361ff34e7 Template Fixes and FPM Enabling for Apache2 2018-05-22 09:01:06 -06:00
earnolmartin
524a9bb8cd Apache FPM Template Fixes 2018-05-21 20:19:44 -06:00
earnolmartin
f945fc06b8 Apache FPM Template Fixes 2018-05-21 20:13:24 -06:00
earnolmartin
eafb72dc70 Need Latest Version of Apache to Use FPM 2018-05-21 19:59:13 -06:00
earnolmartin
8d61ff2ec6 Apache2 Use FPM - Use Secondary Pool for Disable Functions - Fixes 2018-05-21 19:18:01 -06:00
earnolmartin
16d98d233d Create EHCP FPM Pool and Secure WWW Pool 2018-05-21 15:31:47 -06:00
earnolmartin
1b7ca620c2 Disable Functions Just Doesn't Work - Thanks PHP! 2018-05-21 14:21:27 -06:00
earnolmartin
b72b64ed46 If Domain is setup for https redirection, use https for easy install scripts 2018-05-20 01:07:36 -06:00
earnolmartin
21c91e7963 Follow Redirects in cURL Scripts and KEEP POST Data 2018-05-20 00:52:26 -06:00
earnolmartin
3be31c69e9 Follow Redirects in cURL Script 2018-05-20 00:26:29 -06:00
earnolmartin
b420bbf6da Array directives inherit to child contexts in a different way than some other directives. The information from array directives will inherit to child contexts only if they are not present at any place in the child context. This means that if you use fastcgi_param within your location, it will effectively clear out the values inherited from the parent context completely. https://www.digitalocean.com/community/tutorials/understanding-and-implementing-fastcgi-proxying-in-nginx 2018-05-20 00:14:22 -06:00
earnolmartin
9064b7a57a Template Fixes 2018-05-14 14:56:56 -06:00
earnolmartin
a2a1f3c6d5 Template Fixes 2018-05-14 14:50:40 -06:00
earnolmartin
9482334cf8 Template Fixes 2018-05-14 14:35:57 -06:00
earnolmartin
e4ce7086e5 Do Not Add Slave DNS Domains or Subdomains to Hosts File 2018-05-14 14:13:15 -06:00
earnolmartin
5c5b9fb817 Do Not Add Slave DNS Domains or Subdomains to Hosts File 2018-05-14 12:32:23 -06:00
earnolmartin
77a33287d4 Fixed minor updater script issue and added more output during update / upgrade 2018-05-01 12:47:43 -06:00
earnolmartin
7f06a0668c Minor Additions - DO NOT FORCE TLS over FTP 2018-05-01 12:09:00 -06:00
earnolmartin
e6f4c0f204 Wording Change 2018-05-01 11:18:04 -06:00
earnolmartin
fa63af14df Added SSL to VSFTPD 2018-05-01 11:15:40 -06:00
earnolmartin
a1c140a4c6 Removed Unused File 2018-04-26 23:07:47 -06:00
earnolmartin
0687f6131c NET2FTP Enhancements 2018-04-26 23:06:08 -06:00
earnolmartin
68ef9077a2 Minor Changes 2018-04-26 22:24:23 -06:00
earnolmartin
3e612db836 Minor Changes 2018-04-26 22:23:39 -06:00
earnolmartin
4b253c5b1b Fixes for Newer Versions of PHP & Minor Installer Changes 2018-04-26 22:13:50 -06:00
earnolmartin
c017b57396 Fix for Email in Ubuntu 18.04 2018-04-26 19:01:25 -06:00
earnolmartin
f6192c837e Removed Unnecessary CORs Disabling - Should be up to the application and the server side scripting language to decide 2018-04-26 16:54:15 -06:00
earnolmartin
a7b018ac71 Installer Changes 2018-04-02 18:26:23 -06:00
earnolmartin
2883251222 Installer Changes 2018-04-02 18:13:41 -06:00
earnolmartin
abbd83017c Installer Changes 2018-04-02 18:06:22 -06:00
earnolmartin
d2cece1cb8 Get Inputs Needs to Be Run First! 2018-04-02 17:54:12 -06:00
earnolmartin
78c59f7119 Minor Change 2018-04-02 17:40:39 -06:00
earnolmartin
0adf8e84cd Prompt for desired MySQL root user password. 2018-04-02 17:39:12 -06:00
earnolmartin
363e7d25d2 Bye SourceForge 2018-04-02 17:16:43 -06:00
earnolmartin
dc5d71adb9 Updated ReadMe 2018-04-02 17:01:06 -06:00
earnolmartin
116603968e Updated ReadMe 2018-04-02 16:59:08 -06:00
earnolmartin
22828fd693 Bye SourceForge 2018-04-02 16:52:31 -06:00
1315 changed files with 27964 additions and 24838 deletions

View file

@ -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
[![EHCP Force Edition Panel](https://img.youtube.com/vi/QQh6eqiWogI/0.jpg)](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

View file

@ -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));

View file

@ -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;
}

View file

@ -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);

View file

@ -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

View file

@ -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')

View file

@ -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')

View file

@ -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";

View file

@ -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";

View file

@ -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);

View file

@ -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);

View file

@ -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>

View file

@ -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}

View file

@ -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}

View file

@ -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

View file

@ -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}

View file

@ -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>

File diff suppressed because it is too large Load diff

View file

@ -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,

View file

@ -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

View file

@ -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}

View file

@ -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}

View file

@ -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}

View file

@ -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

View file

@ -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}

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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}

View file

@ -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}

View file

@ -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}

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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}

View file

@ -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}

View file

@ -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}

View file

@ -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}

View file

@ -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}____________

View file

@ -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>

View file

@ -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>

View file

@ -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)$ {

View file

@ -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

View file

@ -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;

View file

@ -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) {

View file

@ -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

View file

@ -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/;
}
}
}

View file

@ -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;

View file

@ -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;
}

View file

@ -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;

View file

@ -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) {

View file

@ -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

View file

@ -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/;
}
}
}

View file

@ -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;

View file

@ -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;
}

View file

@ -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;

View file

@ -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;

View file

@ -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 ###

View file

@ -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/;
}
}
}

View file

@ -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;

View file

@ -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;
}

View file

@ -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;

View file

@ -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;

View file

@ -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

View file

@ -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/;
}
}
}

View file

@ -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;

View file

@ -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;
}

View 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
"""

View 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
"""

View 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
"""

View 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
"""

View file

@ -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

View file

@ -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'];
}
}
?>

View file

@ -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."

View file

@ -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
//------------------------------------------------------------------------------

View file

@ -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
}

View file

@ -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';

View file

@ -1,5 +0,0 @@
<?php
session_start();
echo $_SESSION['FTP_HOME_PATH'];
?>

View file

@ -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;
}

View file

@ -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"]);

View file

@ -56,7 +56,11 @@ class ext_ehcp_authentication {
}
function onShowLoginForm() {
echo "<p style='color: red; text-align: center;'>Unauthorized.&nbsp; 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.&nbsp; Please login to the <a href='../'>EHCP panel</a> and try again.</p>";
}
}
function onLogout() {

View file

@ -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"]);

View file

@ -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"]);

View file

@ -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", "&nbsp;&nbsp;&nbsp;&nbsp;", htmlentities($content)));
//$content2 = nl2br(str_replace("\t", "&nbsp;&nbsp;&nbsp;&nbsp;", 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);
}
}
}

View file

@ -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);

View file

@ -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"];

View file

@ -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' ) ) ;

View file

@ -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;

View file

@ -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;

View file

@ -78,7 +78,11 @@ function login() {
exit();
}
echo "<p style='color: red; text-align: center;'>Unauthorized.&nbsp; 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.&nbsp; Please login to the <a href='../'>EHCP panel</a> and try again.</p>";
}
define( '_LOGIN_REQUIRED', 1 );
}

View file

@ -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') {

View file

@ -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"]);

View file

@ -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;
}
?>
?>

View file

@ -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'));

View file

@ -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"])) {

View file

@ -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' ))) {

View file

@ -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];
}
}

View file

@ -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