| 1 |
Index: configs/freebsd/apache/working/ispcp.conf |
|---|
| 2 |
=================================================================== |
|---|
| 3 |
--- configs/freebsd/apache/working/ispcp.conf (revision 1132) |
|---|
| 4 |
+++ configs/freebsd/apache/working/ispcp.conf (working copy) |
|---|
| 5 |
@@ -1,4 +1,41 @@ |
|---|
| 6 |
+# httpd Data BEGIN. |
|---|
| 7 |
|
|---|
| 8 |
# |
|---|
| 9 |
-# This file will be replaced by ../httpd.conf when make is executed |
|---|
| 10 |
+# wget-hack prevention |
|---|
| 11 |
# |
|---|
| 12 |
+ |
|---|
| 13 |
+<IfModule mod_rewrite.c> |
|---|
| 14 |
+ RewriteEngine on |
|---|
| 15 |
+ RewriteCond %{HTTP_USER_AGENT} ^LWP::Simple |
|---|
| 16 |
+ RewriteRule ^/.* http://%{REMOTE_ADDR}/ [L,E=nolog:1] |
|---|
| 17 |
+</IfModule> |
|---|
| 18 |
+ |
|---|
| 19 |
+# |
|---|
| 20 |
+# Web traffic accounting. |
|---|
| 21 |
+# |
|---|
| 22 |
+ |
|---|
| 23 |
+LogFormat "%B" traff |
|---|
| 24 |
+ |
|---|
| 25 |
+# |
|---|
| 26 |
+# mod_cband configuration |
|---|
| 27 |
+# |
|---|
| 28 |
+ |
|---|
| 29 |
+<IfModule mod_cband.c> |
|---|
| 30 |
+ CBandScoreFlushPeriod 10 |
|---|
| 31 |
+ CBandRandomPulse On |
|---|
| 32 |
+</IfModule> |
|---|
| 33 |
+ |
|---|
| 34 |
+# |
|---|
| 35 |
+# let the customer decide what charset he likes to use |
|---|
| 36 |
+# |
|---|
| 37 |
+ |
|---|
| 38 |
+AddDefaultCharset Off |
|---|
| 39 |
+ |
|---|
| 40 |
+# |
|---|
| 41 |
+# Header End |
|---|
| 42 |
+# |
|---|
| 43 |
+ |
|---|
| 44 |
+# httpd [{IP}] virtual host entry BEGIN. |
|---|
| 45 |
+# httpd [{IP}] virtual host entry END. |
|---|
| 46 |
+ |
|---|
| 47 |
+# httpd Data END. |
|---|
| 48 |
Index: configs/freebsd/apache/00_master.conf |
|---|
| 49 |
=================================================================== |
|---|
| 50 |
--- configs/freebsd/apache/00_master.conf (revision 1132) |
|---|
| 51 |
+++ configs/freebsd/apache/00_master.conf (working copy) |
|---|
| 52 |
@@ -70,14 +70,14 @@ |
|---|
| 53 |
|
|---|
| 54 |
<IfModule mod_php4.c> |
|---|
| 55 |
<Directory {ROOT_DIR}/gui> |
|---|
| 56 |
- php_admin_value open_basedir "{WWW_DIR}/{DMN_NAME}/:{CONF_DIR}/:{MR_LOCK_FILE}:/proc/:/bin/df:/bin/mount:{RKHUNTER_LOG}:{CHKROOTKIT_LOG}:{PEAR_DIR}/{OTHER_ROOTKIT_LOG}" |
|---|
| 57 |
+ php_admin_value open_basedir "{WWW_DIR}/{DMN_NAME}/:{CONF_DIR}/:{MR_LOCK_FILE}:/proc/:/bin/df:/sbin/mount:{RKHUNTER_LOG}:{CHKROOTKIT_LOG}:{PEAR_DIR}/{OTHER_ROOTKIT_LOG}" |
|---|
| 58 |
php_admin_value session.save_path "{ROOT_DIR}/gui/phptmp/" |
|---|
| 59 |
php_admin_value upload_tmp_dir "{ROOT_DIR}/gui/phptmp/" |
|---|
| 60 |
</Directory> |
|---|
| 61 |
</IfModule> |
|---|
| 62 |
<IfModule mod_php5.c> |
|---|
| 63 |
<Directory {ROOT_DIR}/gui> |
|---|
| 64 |
- php_admin_value open_basedir "{WWW_DIR}/{DMN_NAME}/:{CONF_DIR}/:{MR_LOCK_FILE}:/proc/:/bin/df:/bin/mount:{RKHUNTER_LOG}:{CHKROOTKIT_LOG}:{PEAR_DIR}/{OTHER_ROOTKIT_LOG}" |
|---|
| 65 |
+ php_admin_value open_basedir "{WWW_DIR}/{DMN_NAME}/:{CONF_DIR}/:{MR_LOCK_FILE}:/proc/:/bin/df:/sbin/mount:{RKHUNTER_LOG}:{CHKROOTKIT_LOG}:{PEAR_DIR}/{OTHER_ROOTKIT_LOG}" |
|---|
| 66 |
php_admin_value session.save_path "{ROOT_DIR}/gui/phptmp/" |
|---|
| 67 |
php_admin_value upload_tmp_dir "{ROOT_DIR}/gui/phptmp/" |
|---|
| 68 |
</Directory> |
|---|
| 69 |
Index: configs/freebsd/postfix/main.cf |
|---|
| 70 |
=================================================================== |
|---|
| 71 |
--- configs/freebsd/postfix/main.cf (revision 1132) |
|---|
| 72 |
+++ configs/freebsd/postfix/main.cf (working copy) |
|---|
| 73 |
@@ -108,8 +108,8 @@ |
|---|
| 74 |
# TLS parameters; activate, if avaible/used |
|---|
| 75 |
#smtpd_use_tls = yes |
|---|
| 76 |
#smtpd_tls_loglevel = 2 |
|---|
| 77 |
-#smtpd_tls_cert_file = /etc/postfix/cert.pem |
|---|
| 78 |
-#smtpd_tls_key_file = /etc/postfix/privkey.pem |
|---|
| 79 |
+#smtpd_tls_cert_file = /usr/local/etc/postfix/cert.pem |
|---|
| 80 |
+#smtpd_tls_key_file = /usr/local/etc/postfix/privkey.pem |
|---|
| 81 |
#smtpd_tls_auth_only = no |
|---|
| 82 |
#smtpd_tls_received_header = yes |
|---|
| 83 |
|
|---|
| 84 |
Index: docs/FreeBSD/INSTALL |
|---|
| 85 |
=================================================================== |
|---|
| 86 |
--- docs/FreeBSD/INSTALL (revision 1132) |
|---|
| 87 |
+++ docs/FreeBSD/INSTALL (working copy) |
|---|
| 88 |
@@ -17,7 +17,7 @@ |
|---|
| 89 |
1) Version Info |
|---|
| 90 |
--------------- |
|---|
| 91 |
ispCP ω Version : 1.0.0 RC5 |
|---|
| 92 |
-INSTALL Script : 3.0 |
|---|
| 93 |
+INSTALL Script : 3.5 |
|---|
| 94 |
Maintainer : |
|---|
| 95 |
Homepage : http://www.isp-contol.net |
|---|
| 96 |
Distros : FreeBSD |
|---|
| 97 |
@@ -52,7 +52,8 @@ |
|---|
| 98 |
================================================================================ |
|---|
| 99 |
4) Installation |
|---|
| 100 |
--------------- |
|---|
| 101 |
-Make sure you are logged in as root and MySQL is running. |
|---|
| 102 |
+Make sure you are logged in as root and MySQL is running |
|---|
| 103 |
+and Name Server rndc.key has been setup. |
|---|
| 104 |
|
|---|
| 105 |
1. Untar or unzip the distribution files to a secure directory: |
|---|
| 106 |
# cd /root |
|---|
| 107 |
@@ -152,7 +153,7 @@ |
|---|
| 108 |
A.- Please install and configure apache 2.2.x mod_cband package/port |
|---|
| 109 |
|
|---|
| 110 |
Q.- Can I run ispcp under FreeBSD Jail? |
|---|
| 111 |
-A.- Yes you can, but you have to modified the daemon to accept connection on jail IP |
|---|
| 112 |
+A.- Yes you can, but you have to modify the daemon to accept connection on jail IP |
|---|
| 113 |
|
|---|
| 114 |
Please check http://www.isp-control.net for any questions not answered in this file. |
|---|
| 115 |
|
|---|
| 116 |
Index: docs/FreeBSD/freebsd-packages |
|---|
| 117 |
=================================================================== |
|---|
| 118 |
--- docs/FreeBSD/freebsd-packages (revision 1132) |
|---|
| 119 |
+++ docs/FreeBSD/freebsd-packages (working copy) |
|---|
| 120 |
@@ -7,7 +7,7 @@ |
|---|
| 121 |
+ mod_cband for bandwitdh management |
|---|
| 122 |
o mod_php WARNING: security risk for hosting |
|---|
| 123 |
+ mod_fastcgi ( Recomended ) |
|---|
| 124 |
- + mod_proxy Req for awstat |
|---|
| 125 |
+ + mod_proxy Req for awstats |
|---|
| 126 |
Proftpd FTP System |
|---|
| 127 |
x IPV6 IP v6 support ( but disable by ispcp ) |
|---|
| 128 |
x mysql Database module |
|---|
| 129 |
@@ -17,8 +17,9 @@ |
|---|
| 130 |
- delay Not Available in ports |
|---|
| 131 |
- ctrls_admin Not Available in ports |
|---|
| 132 |
Postfix Email System |
|---|
| 133 |
+Procmail Mail filter System |
|---|
| 134 |
Bash Shell compatibility with Main Version |
|---|
| 135 |
-courier-imap IMAP system |
|---|
| 136 |
+courier-imap IMAP system, please use version 4.3.x and above |
|---|
| 137 |
x userdb For use with userdb ( ispcp default ) |
|---|
| 138 |
x mysql For use with mysql |
|---|
| 139 |
courier-pop3 IMAP POP3 system |
|---|
| 140 |
@@ -57,11 +58,11 @@ |
|---|
| 141 |
x CLI |
|---|
| 142 |
x CGI |
|---|
| 143 |
x suhosin |
|---|
| 144 |
- x fastcgi |
|---|
| 145 |
+ + fastcgi |
|---|
| 146 |
PHP-Extensions |
|---|
| 147 |
x pcre |
|---|
| 148 |
x bz2 |
|---|
| 149 |
- x core |
|---|
| 150 |
+ x ctype |
|---|
| 151 |
x curl |
|---|
| 152 |
x dbx |
|---|
| 153 |
x domxml |
|---|
| 154 |
Index: Makefile.fbsd |
|---|
| 155 |
=================================================================== |
|---|
| 156 |
--- Makefile.fbsd (revision 1132) |
|---|
| 157 |
+++ Makefile.fbsd (working copy) |
|---|
| 158 |
@@ -37,13 +37,14 @@ |
|---|
| 159 |
HOST_OS=freebsd |
|---|
| 160 |
|
|---|
| 161 |
ROOT_CONF=$(INST_PREF)/usr/local/etc |
|---|
| 162 |
-SYSTEM_ROOT=$(INST_PREF)/usr/local/www/ispcp |
|---|
| 163 |
+SYSTEM_WEB=/usr/local/www |
|---|
| 164 |
+SYSTEM_ROOT=$(INST_PREF)$(SYSTEM_WEB)/ispcp |
|---|
| 165 |
SYSTEM_CONF=$(INST_PREF)/usr/local/etc/ispcp |
|---|
| 166 |
SYSTEM_LOG=$(INST_PREF)/var/log/ispcp |
|---|
| 167 |
-SYSTEM_APACHE_BACK_LOG=$(INST_PREF)/usr/local/www/logs/backup |
|---|
| 168 |
-SYSTEM_VIRTUAL=$(INST_PREF)/usr/local/www/data/virtual |
|---|
| 169 |
-SYSTEM_AWSTATS=$(INST_PREF)/usr/local/www/awstats |
|---|
| 170 |
-SYSTEM_FCGI=$(INST_PREF)/usr/local/www/data/fcgi |
|---|
| 171 |
+SYSTEM_APACHE_BACK_LOG=$(INST_PREF)$(SYSTEM_WEB)/logs/backup |
|---|
| 172 |
+SYSTEM_VIRTUAL=$(INST_PREF)$(SYSTEM_WEB)/data/virtual |
|---|
| 173 |
+SYSTEM_AWSTATS=$(INST_PREF)$(SYSTEM_WEB)/awstats |
|---|
| 174 |
+SYSTEM_FCGI=$(INST_PREF)$(SYSTEM_WEB)/data/fcgi |
|---|
| 175 |
SYSTEM_MAIL_VIRTUAL=$(INST_PREF)/var/mail/virtual |
|---|
| 176 |
SYSTEM_MAKE_DIRS=/bin/mkdir -p |
|---|
| 177 |
SYSTEM_MAKE_FILE=/bin/touch |
|---|
| 178 |
Index: tools/daemon/lr_syntax.c |
|---|
| 179 |
=================================================================== |
|---|
| 180 |
--- tools/daemon/lr_syntax.c (revision 1132) |
|---|
| 181 |
+++ tools/daemon/lr_syntax.c (working copy) |
|---|
| 182 |
@@ -15,6 +15,8 @@ |
|---|
| 183 |
|
|---|
| 184 |
#if !defined(__OpenBSD__) && !defined(__FreeBSD__) |
|---|
| 185 |
int readlink(char *pathname, char *buf, int bufsize); |
|---|
| 186 |
+#else |
|---|
| 187 |
+int readlink(const char *pathname, char *buf, int bufsize); |
|---|
| 188 |
#endif |
|---|
| 189 |
|
|---|
| 190 |
int lr_syntax(int fd, char *buff) |
|---|
| 191 |
@@ -24,6 +26,14 @@ |
|---|
| 192 |
|
|---|
| 193 |
time_t tim; |
|---|
| 194 |
|
|---|
| 195 |
+ /* |
|---|
| 196 |
+ OpenBSD or FreeBSD OLD Routine |
|---|
| 197 |
+ */ |
|---|
| 198 |
+ #if !defined(__OpenBSD__) && !defined(__FreeBSD__) |
|---|
| 199 |
+ #else |
|---|
| 200 |
+ char qcommand [MAX_MSG_SIZE]; |
|---|
| 201 |
+ #endif |
|---|
| 202 |
+ |
|---|
| 203 |
ptr = strstr(buff, message(MSG_EQ_CMD)); |
|---|
| 204 |
|
|---|
| 205 |
if (ptr != buff) { |
|---|
| 206 |
@@ -104,6 +114,22 @@ |
|---|
| 207 |
|
|---|
| 208 |
execl( daemon_path, "ispcp-rqst-mngr" ,(char*)NULL ); |
|---|
| 209 |
} |
|---|
| 210 |
+ #else |
|---|
| 211 |
+ /* |
|---|
| 212 |
+ OpenBSD or FreeBSD OLD Routine |
|---|
| 213 |
+ Temporary HARDCODED |
|---|
| 214 |
+ */ |
|---|
| 215 |
+ memset((void *) &qcommand, '\0', (size_t) sizeof(MAX_MSG_SIZE)); |
|---|
| 216 |
+ sprintf(qcommand, |
|---|
| 217 |
+ "%s 1>%s/%s.%ld 2>%s/%s.%ld", |
|---|
| 218 |
+ "/usr/local/www/ispcp/engine/ispcp-rqst-mngr", |
|---|
| 219 |
+ LOG_DIR, |
|---|
| 220 |
+ STDOUT_LOG, |
|---|
| 221 |
+ (long int) tim, |
|---|
| 222 |
+ LOG_DIR, |
|---|
| 223 |
+ STDERR_LOG, |
|---|
| 224 |
+ (long int) tim); |
|---|
| 225 |
+ system(qcommand); |
|---|
| 226 |
#endif |
|---|
| 227 |
exit(0); |
|---|
| 228 |
} |
|---|
| 229 |
Index: tools/daemon/BSDmakefile |
|---|
| 230 |
=================================================================== |
|---|
| 231 |
--- tools/daemon/BSDmakefile (revision 1132) |
|---|
| 232 |
+++ tools/daemon/BSDmakefile (working copy) |
|---|
| 233 |
@@ -28,11 +28,11 @@ |
|---|
| 234 |
# http://isp-control.net |
|---|
| 235 |
# |
|---|
| 236 |
|
|---|
| 237 |
-#ifneq (,$(findstring noopt,$(DAEMON_OPTIONS))) |
|---|
| 238 |
+#.if eq (,$(findstring noopt,$(DAEMON_OPTIONS))) |
|---|
| 239 |
+#CFLAGS += -O3 |
|---|
| 240 |
+#.else |
|---|
| 241 |
#CFLAGS += -O0 |
|---|
| 242 |
-#else |
|---|
| 243 |
-CFLAGS += -O3 |
|---|
| 244 |
-#endif |
|---|
| 245 |
+#.endif |
|---|
| 246 |
|
|---|
| 247 |
|
|---|
| 248 |
OBJS = ispcp_daemon.o message.o daemon_init.o say.o signal-handlers.o\ |
|---|
| 249 |
Index: tools/daemon/helo_syntax.c |
|---|
| 250 |
=================================================================== |
|---|
| 251 |
--- tools/daemon/helo_syntax.c (revision 1132) |
|---|
| 252 |
+++ tools/daemon/helo_syntax.c (working copy) |
|---|
| 253 |
@@ -7,6 +7,7 @@ |
|---|
| 254 |
|
|---|
| 255 |
ptr = strstr(buff, message(MSG_HELO_CMD)); |
|---|
| 256 |
|
|---|
| 257 |
+/* |
|---|
| 258 |
if (ptr != buff || strlen(buff) == 7) { |
|---|
| 259 |
|
|---|
| 260 |
if (send_line(fd, message(MSG_BAD_SYNTAX), strlen(message(MSG_BAD_SYNTAX))) < 0) { |
|---|
| 261 |
@@ -16,7 +17,9 @@ |
|---|
| 262 |
return (1); |
|---|
| 263 |
|
|---|
| 264 |
} else { |
|---|
| 265 |
- char *helo_ans = calloc(MAX_MSG_SIZE, sizeof(char)); |
|---|
| 266 |
+*/ |
|---|
| 267 |
+ |
|---|
| 268 |
+ char *helo_ans = calloc(MAX_MSG_SIZE, sizeof(char)); |
|---|
| 269 |
|
|---|
| 270 |
ptr = strstr(buff, " "); |
|---|
| 271 |
|
|---|
| 272 |
@@ -32,7 +35,9 @@ |
|---|
| 273 |
} |
|---|
| 274 |
|
|---|
| 275 |
free(helo_ans); |
|---|
| 276 |
+ |
|---|
| 277 |
+/* |
|---|
| 278 |
} |
|---|
| 279 |
- |
|---|
| 280 |
+*/ |
|---|
| 281 |
return (NO_ERROR); |
|---|
| 282 |
} |
|---|
| 283 |
Index: BSDmakefile |
|---|
| 284 |
=================================================================== |
|---|
| 285 |
--- BSDmakefile (revision 1132) |
|---|
| 286 |
+++ BSDmakefile (working copy) |
|---|
| 287 |
@@ -30,6 +30,7 @@ |
|---|
| 288 |
# http://isp-control.net |
|---|
| 289 |
# |
|---|
| 290 |
|
|---|
| 291 |
+ |
|---|
| 292 |
.ifdef $(OSTYPE)==FreeBSD |
|---|
| 293 |
.include <Makefile.fbsd> |
|---|
| 294 |
.else |
|---|
| 295 |
@@ -37,7 +38,9 @@ |
|---|
| 296 |
.endif |
|---|
| 297 |
|
|---|
| 298 |
install: |
|---|
| 299 |
- |
|---|
| 300 |
+ # |
|---|
| 301 |
+ # Preparing ISPCP System Directory and files |
|---|
| 302 |
+ # |
|---|
| 303 |
cd ./tools && $(MAKE) install |
|---|
| 304 |
$(SYSTEM_MAKE_DIRS) $(SYSTEM_CONF) |
|---|
| 305 |
$(SYSTEM_MAKE_DIRS) $(SYSTEM_ROOT) |
|---|
| 306 |
@@ -52,13 +55,29 @@ |
|---|
| 307 |
cd ./gui && $(MAKE) install |
|---|
| 308 |
cd ./keys && $(MAKE) install |
|---|
| 309 |
|
|---|
| 310 |
+ # |
|---|
| 311 |
# Patch some variable |
|---|
| 312 |
+ # |
|---|
| 313 |
/usr/bin/sed s/"\/etc\/ispcp\/ispcp.conf"/"\/usr\/local\/etc\/ispcp\/ispcp.conf"/g ./engine/ispcp_common_code.pl > $(SYSTEM_ROOT)/engine/ispcp_common_code.pl |
|---|
| 314 |
- /usr/bin/sed s/"\/apache\"\;"/"\/apache22\"\;"/g ./engine/setup/ispcp-setup-methods.pl > $(SYSTEM_ROOT)/engine/setup/ispcp-setup-methods.pl |
|---|
| 315 |
|
|---|
| 316 |
+.if exists ($(SYSTEM_WEB)/ispcp/engine/ispcp-db-keys.pl) |
|---|
| 317 |
+ # |
|---|
| 318 |
+ # Previous database key detected, assuming being perform Upgrade Procedure |
|---|
| 319 |
+ # |
|---|
| 320 |
+ cp $(SYSTEM_WEB)/ispcp/engine/ispcp-db-keys.pl $(SYSTEM_ROOT)/engine/ |
|---|
| 321 |
+ cp $(SYSTEM_WEB)/ispcp/engine/messager/ispcp-db-keys.pl $(SYSTEM_ROOT)/engine/messager/ |
|---|
| 322 |
+ cp $(SYSTEM_WEB)/ispcp/gui/include/ispcp-db-keys.php $(SYSTEM_ROOT)/gui/include/ |
|---|
| 323 |
+ cp $(SYSTEM_WEB)/ispcp/gui/tools/pma/config.inc.php $(SYSTEM_ROOT)/gui/tools/pma/ |
|---|
| 324 |
+.endif |
|---|
| 325 |
+ |
|---|
| 326 |
cd ${INST_PREF} && cp -R * / |
|---|
| 327 |
rm -rf ${INST_PREF} |
|---|
| 328 |
|
|---|
| 329 |
+ # |
|---|
| 330 |
+ # |
|---|
| 331 |
+ # If Some error occured please read FAQ first and search at forum in http://www.isp-control.net |
|---|
| 332 |
+ # Go to $(SYSTEM_WEB)/ispcp/engine/setup and type "ispcp-setup" to configure or "ispcp-upgrade" |
|---|
| 333 |
+ # to complete upgrade process |
|---|
| 334 |
|
|---|
| 335 |
uninstall: |
|---|
| 336 |
|
|---|
| 337 |
@@ -79,4 +98,6 @@ |
|---|
| 338 |
|
|---|
| 339 |
clean: |
|---|
| 340 |
|
|---|
| 341 |
- cd ./tools/daemon && $(MAKE) clean |
|---|
| 342 |
\ No newline at end of file |
|---|
| 343 |
+ cd ./tools/daemon && $(MAKE) clean |
|---|
| 344 |
+ |
|---|
| 345 |
+ |
|---|