MRatWork Forum by Mustafa Ramadhan
Sawo Project - Kloxo-MR Discussions => Kloxo-MR Releases => Topic started by: MRatWork on 2013-08-05, 18:22:51
-
The new update was released as Kloxo-MR 6.5.0.f-2013080502.
What different with previous?. The answers are:
1. Change timestamp from 20130318XX (where XX = release number) to YYYYMMDDAA (where YYYY = year; DD = month; DD = day; AA = number)
2. Change lxphp + lxlighttpd to php52s + Hiawatha (read http://www.hiawatha-webserver.org/ (http://www.hiawatha-webserver.org/))
3. Make dns server config also as template-based config (like web server config)
4. Bugfixes some issue (error 'socket' and etc).
5. For php-fpm, now using 'socket' instead 'ip:port'. To make sure in '/etc/sysctl.conf' have content 'fs.file-max = 209708'
Planning:
- add MaraDNS beside Bind and DJBDns
- add Hiawatha beside Apache, Lighttpd and Nginx
====================================
- For fresh install - the same as previous
- For update (especially if using djbdns as dns server):
1. Update kloxo-mr.repo:
cd /etc/yum.repos.d
rm -rf kloxo-mr.repo
wget https://raw.github.com/mustafaramadhan/kloxo/release/kloxo-mr.repo
2. Run this steps:
### update djbdns
yum update djbdns -y
### update for others
yum update
### if using 'cleanup-simple' need additional step with 'sh /script/fixdns'
sh /script/cleanup
### restart - maybe need 2x until no 'FAIlED' message
sh /script/restart-all
===================
Note:
- If have a problem with https/7777 access, change /usr/local/lxlabs/kloxo/init/hiawatha.conf with (already fixed since 2013080602):
# Hiawatha main configuration file
#
ServerString = Hiawatha for Kloxo-MR
ServerId = lxlabs
ConnectionsTotal = 2048
ConnectionsPerIP = 64
SystemLogfile = /usr/local/lxlabs/kloxo/log/hiawatha-system.log
GarbageLogfile = /usr/local/lxlabs/kloxo/log/hiawatha-garbage.log
MaxUrlLength = 65536
PIDfile = /var/run/kloxo-hiawatha.pid
BanOnGarbage = 300
BanOnMaxPerIP = 60
BanOnMaxReqSize = 300
KickOnBan = yes
RebanDuringBan = yes
#CGIhandler = /opt/php52s/bin/php-cgi:php
#ExecuteCGI = yes
FastCGIserver {
FastCGIid = PHP5
ConnectTo = /usr/local/lxlabs/kloxo/init/kloxo-phpcgi.sock
Extension = php
}
MimetypeConfig = hiawatha-mimetype.conf
Binding {
BindingId = port7778
Port = 7778
#Interface = 0.0.0.0
MaxKeepAlive = 180
TimeForRequest = 10,60
MaxRequestSize = 256
}
Binding {
BindingId = port7777
Port = 7777
#Interface = 0.0.0.0
MaxKeepAlive = 180
TimeForRequest = 10,60
MaxRequestSize = 256
#RequiredCA = /usr/local/lxlabs/kloxo/etc/program.ca
SSLcertFile = /usr/local/lxlabs/kloxo/etc/program.pem
}
Hostname = 0.0.0.0
WebsiteRoot = /usr/local/lxlabs/kloxo/httpdocs
StartFile = index.php
AccessLogfile = /usr/local/lxlabs/kloxo/log/hiawatha-access.log
ErrorLogfile = /usr/local/lxlabs/kloxo/log/hiawatha-error.log
TimeForCGI = 7200
UseFastCGI = PHP5
ErrorHandler = 401:/error/401.html
ErrorHandler = 403:/error/403.html
ErrorHandler = 404:/error/404.html
ErrorHandler = 501:/error/501.html
ErrorHandler = 503:/error/503.html
VirtualHost {
RequireSSL = yes
Hostname = 0.0.0.0
WebsiteRoot = /usr/local/lxlabs/kloxo/httpdocs
StartFile = index.php
AccessLogfile = /usr/local/lxlabs/kloxo/log/hiawatha-access.log
ErrorLogfile = /usr/local/lxlabs/kloxo/log/hiawatha-error.log
TimeForCGI = 7200
UseFastCGI = PHP5
ErrorHandler = 401:/error/401.html
ErrorHandler = 403:/error/403.html
ErrorHandler = 404:/error/404.html
ErrorHandler = 501:/error/501.html
ErrorHandler = 503:/error/503.html
}
and then restart kloxo with 'sh /script/restart'.
===================
Upload update to 2013080701 will make bind able to use for Kloxo-MR again!. Please using update kloxo-mr.repo inside /etc/yum.repos.d
-
[root@server yum.repos.d]# sh /script/restart-all
Stopping Djbdns for:
- axfrdns [ OK ]
- tinydns [ OK ]
Starting Djbdns for:
/etc/init.d/djbdns: line 35: cd: /home/djbdns/axfrdns: No such file or directory
- axfrdns [FAILED]
- tinydns [FAILED]
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Stopping nginx:. [ OK ]
Starting nginx: [ OK ]
Stopping php-fpm: [ OK ]
Starting php-fpm: [ OK ]
Restarting qmail:
* Stopping qmail-smtpd.
* Sending qmail-send SIGTERM and restarting.
* Restarting qmail-smtpd.
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
Shutting down MySQL... SUCCESS!
Starting MySQL. SUCCESS!
Stopping kloxo-phpcgi: [ OK ]
Starting kloxo-phpcgi: [ OK ]
Stopping kloxo-hiawatha: [ OK ]
Starting kloxo-hiawatha: [ OK ]
[root@server yum.repos.d]#
-
If djbdns still not work, try change to bind and change back to djbdns ('the famous old trick').
-
hahaha
yea thats work :D
i like "the famous old trick"
:lol:
-
Everything failed - when tried to run sh /script/cleanup it failed with error lxphp.exe missing. Something went wrong. Please advise. Nothing is working. Kloxo has failed.
-
My entire server down - PLEASE ADVISE
-
I got all restart-all status to OK. But no host name resolves on my server. I can not use kloxo or any site on my server.
PLEASE advise Mustafa - quickly, this is very bad
-
Fresh install and it appears to work.
1st server: after 6 hours all status on /script/restart-all OK - unable to reach anything on the server. ping any domain and it says unable to resolve host. I have been trying to get it working all night. I NEED HELP Mustafa.
2. Server. Tried Upgrade again (STUPID ME) - this time nothing works. It installed. /script/cleanup ran. On script/restart-all - It still had old kloxo restart - error about no lxlighttpd. No hiawatha installed. DNS again unreachable. Entire server down. Bind was removed and not reinstalled - when I yum install bind - it installs but on status it gives error about no connecting to remote.
I am unable to get either back online. The only one that is running is my test server inwhich I fresh installed - seems to work.
WHAT SHOULD I DO? This is very bad.
-
I didn't found like this issues for update in my servers.
The 2013080502 have a problem with config especially 'server alias' (cname), but 2013080602 look like ok.
In 2013080602, I found an issue related to slave/secondary dns. DJBDns didn't act as 'master'.
-
Zatrzymywanie php-fpm: [NIEUDANE]
Uruchamianie php-fpm: [06-Aug-2013 15:41:19] ERROR: unable to bind listening socket for address '/home/php-fpm/sock/admin.sock': No such file or directory (2)
[06-Aug-2013 15:41:19] ERROR: FPM initialization failed
[NIEUDANE]
-
Create /home/php-fpm/sock directory. Maybe socket not created because no directory.
-
Ran update again. All status OK. On restart-all. Yet none of my websites OR kloxo available.
service named status gives errors about host connection closed. lists a few reasons why it could be. Ran fixdns and fix web.
Nothing.
What should I do?
-
I've restored Kloxo-MR 6.5.0.f-2013031828 from backup.
2013080602 changed so many things that I need to first test it on a demo server, fix all configs and then slowly move to production server.
PROCEED WITH EXTREME CAUTION ON PRODUCTION SYSTEMS !!!
-
Create /home/php-fpm/sock directory. Maybe socket not created because no directory.
Yes. After creating /home/php-fpm/sock it started working.
DNS still down:
/script/fixdns
- For help, type '/script/fixdns --help'
- No argument supplied. Defaulting to localhost (master) servers
Fixing DNS server config
- 'nowosci.org'('admin') at 'localhost'
[root@localhost home]# /etc/init.d/djbdns restart
Stopping Djbdns for:
- axfrdns [FAILED]
- tinydns [FAILED]
Starting Djbdns for:
- axfrdns [FAILED]
- tinydns [FAILED]
-
Switching from bind and back to djbdns doesn't work:
16:09 Aug/06/2013: 0: [(__system__:/usr/local/lxlabs/kloxo/httpdocs) 'lxphp.exe' '../bin/fix/fixdns.php' '--server=localhost' '--nolog']
16:09 Aug/06/2013: Closed Exec /usr/local/lxlabs/kloxo/cexe/closeinput '/etc/init.d/djbdns restart' >/dev/null 2>&1 &
16:10 Aug/06/2013: 0: [(__system__:/usr/local/lxlabs/kloxo/httpdocs) 'rpm' '-q' 'djbdns']
16:10 Aug/06/2013: 0: [(__system__:/usr/local/lxlabs/kloxo/httpdocs) 'rpm' '-e' '--nodeps' 'djbdns']
16:10 Aug/06/2013: 0: Warning: RPMDB altered outside of yum.
[(__system__:/usr/local/lxlabs/kloxo/httpdocs) 'yum' '-y' 'install' 'bind-utils']
16:10 Aug/06/2013: 1: [(__system__:/usr/local/lxlabs/kloxo/httpdocs) 'rpm' '-q' 'bind-chroot']
16:10 Aug/06/2013: 0: [(__system__:/usr/local/lxlabs/kloxo/httpdocs) 'yum' '-y' 'install' 'bind']
16:10 Aug/06/2013: 0: [(__system__:/usr/local/lxlabs/kloxo/httpdocs) 'chkconfig' 'named' 'on']
16:10 Aug/06/2013: 0: [(__system__:/usr/local/lxlabs/kloxo/httpdocs) '/opt/php52s/bin/php' '../bin/common/setdriver.php' '--server=localhost' '--class=dns' '--driver=bind']
16:10 Aug/06/2013: 1: rndc: connect failed: 127.0.0.1#953: connection refused
[(__system__:/usr/local/lxlabs/kloxo/httpdocs) 'rndc' 'reload' 'nowosci.org']
16:10 Aug/06/2013: 1: rndc: connect failed: 127.0.0.1#953: connection refused
[(__system__:/usr/local/lxlabs/kloxo/httpdocs) 'rndc' 'reload']
16:10 Aug/06/2013: 0: [(__system__:/usr/local/lxlabs/kloxo/httpdocs) 'lxphp.exe' '../bin/fix/fixdns.php' '--server=localhost' '--nolog']
16:10 Aug/06/2013: 0: [(__system__:/usr/local/lxlabs/kloxo/httpdocs) 'rpm' '-q' 'bind']
16:10 Aug/06/2013: 0: warning: /etc/named.conf saved as /etc/named.conf.rpmsave
[(__system__:/usr/local/lxlabs/kloxo/httpdocs) 'rpm' '-e' '--nodeps' 'bind']
16:10 Aug/06/2013: 0: [(__system__:/usr/local/lxlabs/kloxo/httpdocs) 'rpm' '-q' 'bind-utils']
16:10 Aug/06/2013: 0: [(__system__:/usr/local/lxlabs/kloxo/httpdocs) 'rpm' '-e' '--nodeps' 'bind-utils']
16:10 Aug/06/2013: 1: [(__system__:/usr/local/lxlabs/kloxo/httpdocs) 'rpm' '-q' 'bind-chroot']
16:10 Aug/06/2013: 0: Warning: RPMDB altered outside of yum.
[(__system__:/usr/local/lxlabs/kloxo/httpdocs) 'yum' '-y' 'install' 'djbdns']
16:10 Aug/06/2013: 0: [(__system__:/usr/local/lxlabs/kloxo/httpdocs) 'chkconfig' 'djbdns' 'on']
16:10 Aug/06/2013: 0: axfrdns-conf: fatal: unable to create /home/djbdns/axfrdns: file already exists
/etc/init.d/djbdns: line 146: /home/djbdns/axfrdns/tcp: Nie ma takiego pliku ani katalogu
[(__system__:/usr/local/lxlabs/kloxo/httpdocs) '/etc/init.d/djbdns' 'setup']
16:10 Aug/06/2013: 0: [(__system__:/usr/local/lxlabs/kloxo/httpdocs) '/opt/php52s/bin/php' '../bin/common/setdriver.php' '--server=localhost' '--class=dns' '--driver=djbdns']
16:10 Aug/06/2013: 2: make: *** No rule to make target `data', needed by `data.cdb'. Stop.
[(__system__:/home/djbdns/tinydns/root) 'make' ]
16:10 Aug/06/2013: 2: make: *** No targets specified and no makefile found. Stop.
[(__system__:/home/djbdns/axfrdns/root) 'make' ]
16:10 Aug/06/2013: 0: [(__system__:/usr/local/lxlabs/kloxo/httpdocs) 'lxphp.exe' '../bin/fix/fixdns.php' '--server=localhost' '--nolog']
16:10 Aug/06/2013: Closed Exec /usr/local/lxlabs/kloxo/cexe/closeinput '/etc/init.d/djbdns restart' >/dev/null 2>&1 &
16:10 Aug/06/2013: Closed Exec /usr/local/lxlabs/kloxo/cexe/closeinput '/etc/init.d/named force-reload' >/dev/null 2>&1 &
-
same with me
i failed to star axfrdns
[root@server ~]# /etc/init.d/djbdns restart
Stopping Djbdns for:
- axfrdns [ OK ]
- tinydns [ OK ]
Starting Djbdns for:
- axfrdns [FAILED]
- tinydns [ OK ]
[root@server ~]#
-
Runned /script/cleanup again and this time only axfrdns fails:
/etc/init.d/djbdns restart
Stopping Djbdns for:
- axfrdns [ OK ]
- tinydns [ OK ]
Starting Djbdns for:
- axfrdns [FAILED]
- tinydns [ OK ]
-
Try delete /home/djbdns/axfrdns, /home/djbdns/tinydns and /home/djbdns/dnscache and then run 'service djbdns setup'.
I found issue for Centos 6. Djbdns not work if 'make' no exists. Need install with 'yum install make'
-
Files inside /home/djbdns/axfrdns/root are missing
Make installed
-
Now it's working !
service djbdns setup
Stopping Djbdns for:
- axfrdns [ OK ]
- tinydns [ OK ]
Djbdns setup for:
- tinydns setup finished
- axfrdns setup finished
- dnscache setup finished
Starting Djbdns for:
- axfrdns [ OK ]
- tinydns [ OK ]
-
Running 'service djbdns setup' will be create/recreate all dirs/files needed.
-
Running 'service djbdns setup' will be create/recreate all dirs/files needed.
DNS service stil down ;)
dig @ns1.nowosci.org nowosci.org
dig: couldn't get address for 'ns1.nowosci.org': not found
root 19396 0.0 0.0 4092 452 ? S 16:17 0:00 tcpserver -vDRHl0 -x tcp.cdb -- 0.0.0.0 53 //bin/axfrdns
tinydns 19400 0.0 0.0 4052 420 ? S 16:17 0:00 //bin/tinydns
root 19434 0.0 0.0 103252 892 pts/0 R+ 16:19 0:00 grep dns
-
Some logs:
16:17 Aug/06/2013: Closed Exec /usr/local/lxlabs/kloxo/cexe/closeinput '/etc/init.d/djbdns restart' >/dev/null 2>&1 &
16:22 Aug/06/2013: 2: make: *** No rules to create object `data', required by `data.cdb'. Stop.
[(__system__:/home/djbdns/tinydns/root) 'make' ]
16:22 Aug/06/2013: 2: make: *** No targets specified and not found makefile. Stop.
[(__system__:/home/djbdns/axfrdns/root) 'make' ]
-
After running 'setup' need fixdns and restart djbdns
-
After running 'setup' need fixdns and restart djbdns
[root@localhost /]# /script/fixdns
- For help, type '/script/fixdns --help'
- No argument supplied. Defaulting to localhost (master) servers
Fixing DNS server config
- 'nowosci.org'('admin') at 'localhost'
[root@localhost /]# /etc/init.d/djbdns restart
Stopping Djbdns for:
- axfrdns [ OK ]
- tinydns [ OK ]
Starting Djbdns for:
- axfrdns [ OK ]
- tinydns [ OK ]
[root@localhost /]# tail -f /usr/local/lxlabs/kloxo/log/shell_exec
16:17 Aug/06/2013: Closed Exec /usr/local/lxlabs/kloxo/cexe/closeinput '/etc/init.d/djbdns restart' >/dev/null 2>&1 &
16:22 Aug/06/2013: 2: make: *** Brak regu? do zrobienia obiektu `data', wymaganego przez `data.cdb'. Stop.
[(__system__:/home/djbdns/tinydns/root) 'make' ]
16:22 Aug/06/2013: 2: make: *** Nie podano obiektów i nie znaleziono makefile. Stop.
[(__system__:/home/djbdns/axfrdns/root) 'make' ]
16:23 Aug/06/2013: Closed Exec /usr/local/lxlabs/kloxo/cexe/closeinput '/etc/init.d/djbdns restart' >/dev/null 2>&1 &
16:23 Aug/06/2013: 2: make: *** Brak regu? do zrobienia obiektu `data', wymaganego przez `data.cdb'. Stop.
[(__system__:/home/djbdns/tinydns/root) 'make' ]
16:23 Aug/06/2013: 2: make: *** Nie podano obiektów i nie znaleziono makefile. Stop.
[(__system__:/home/djbdns/axfrdns/root) 'make' ]
-
Try with 'yum list installed make'. Maybe 'make' not installed.
-
Try with 'yum list installed make'. Maybe 'make' not installed.
yum list installed make
Loaded plugins: fastestmirror, priorities, protectbase, replace
Loading mirror speeds from cached hostfile
* base: sunsite.icm.edu.pl
* elrepo: mirrors.ircam.fr
* epel: ftp.icm.edu.pl
* extras: sunsite.icm.edu.pl
* kloxo-mr-epel: ftp.icm.edu.pl
* kloxo-mr-ius: mirrors.ircam.fr
* remi: rpms.famillecollet.com
* remi-test: rpms.famillecollet.com
* updates: sunsite.icm.edu.pl
0 packages excluded due to repository protections
Installed Packages
make.x86_64 1:3.81-20.el6 @base
-
Please translate polish language for message. It's make additional step to use google translate for to know what's the message mean.
-
Please translate polish language for message. It's make additional step to use google translate for to know what's the message mean.
16:17 Aug/06/2013: Closed Exec /usr/local/lxlabs/kloxo/cexe/closeinput '/etc/init.d/djbdns restart' >/dev/null 2>&1 &
16:22 Aug/06/2013: 2: make: *** No rules to create object `data', required by `data.cdb'. Stop.
[(__system__:/home/djbdns/tinydns/root) 'make' ]
16:22 Aug/06/2013: 2: make: *** No targets specified and not found makefile. Stop.
[(__system__:/home/djbdns/axfrdns/root) 'make' ]
-
got it :)
but i check frm into dns my domain not resolve :
[root@server djbdns]# service djbdns restart
Stopping Djbdns for:
- axfrdns [ OK ]
- tinydns [ OK ]
Starting Djbdns for:
- axfrdns [ OK ]
- tinydns [ OK ]
[root@server djbdns]# sh /script/restart-all
Stopping Djbdns for:
- axfrdns [FAILED]
- tinydns [FAILED]
Starting Djbdns for:
- axfrdns [ OK ]
- tinydns [ OK ]
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
Stopping nginx:. [ OK ]
Starting nginx: [ OK ]
Stopping php-fpm: [ OK ]
Starting php-fpm: [ OK ]
Restarting qmail:
* Stopping qmail-smtpd.
* Sending qmail-send SIGTERM and restarting.
* Restarting qmail-smtpd.
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
Stopping mysqld: [ OK ]
Starting mysqld: [ OK ]
Stopping kloxo-phpcgi: [ OK ]
Starting kloxo-phpcgi: [ OK ]
Stopping kloxo-hiawatha: [ OK ]
Starting kloxo-hiawatha: [ OK ]
[root@server djbdns]#
http://bit.ly/1cth35i (http://bit.ly/1cth35i)
-
got it :)
but i check frm into dns my domain not resolve :
Domains still does not work, because djbdns is unable to create domains configs. It just service running.
-
i had done run
sh /script/cleanup
sh /script/fixdns
sh /script/restart-all
but sam domain name not resolve
-
Go to /home/djbdns/tinydns/root and then run 'make'. Inform here what's you see.
-
[root@server root]# make
//bin/tinydns-data
[root@server root]#
-
re run
got this :
[root@server root]# make
make: *** No rule to make target `data', needed by `data.cdb'. Stop.
[root@server root]#
-
re run
got this :
[root@server root]# make
make: *** No rule to make target `data', needed by `data.cdb'. Stop.
[root@server root]#
Same to me.
-
For djbdns, run:
mkdir -p /home/djbdns/conf/master
mkdir -p /home/djbdns/conf/slave
mkdir -p /home/djbdns/conf/defaults
mkdir -p /home/djbdns/conf/reverse
sh /script/fixdns
service djbdns restart
-
And now it works !
-
kloxomr-6.5.0.f-2013080605
fixied my dns trouble , bind ok + djbdns ok
thanks
-
sorry
djbdns only
in my case
-
try install on my new server
fs.file-max = 209708
fs.file-max = 209708
fs.file-max = 209708
fs.file-max = 209708
m: command not found
Modified MRatWork repos and then install some packages...
m: command not found
m: command not found
m: command not found
what a command not found ?
-
try install on my new server
fs.file-max = 209708
fs.file-max = 209708
fs.file-max = 209708
fs.file-max = 209708
m: command not found
Modified MRatWork repos and then install some packages...
m: command not found
m: command not found
m: command not found
what a command not found ?
Look like install 2013080502. I am not remember about 'm: command not found' but not exists when install 2013080605.
-
yep !
i got this screen on my ssh
error reading information on service hiawatha: No such file or directory
Unknown option. Use '-h' for help.
this is for new install
i use caentos 6 x 64bit
and also same when try install kloxomr
-
yep !
i got this screen on my ssh
error reading information on service hiawatha: No such file or directory
Unknown option. Use '-h' for help.
this is for new install
i use caentos 6 x 64bit
and also same when try install kloxomr
Remember, Kloxo-MR not using /etc/init.d/hiawatha service and Kloxo-MR will be disable it with running 'chkconfig hiawatha off; service hiawatha stop'.
Instead using hiawatha service, Kloxo-MR execute hiawatha symlink (call as kloxo-hiawatha; beside php-cgi symlink call as kloxo-phpcgi).
So, Kloxo-MR don't need hiawatha but make 'special' hiawatha instance.
-
[root@pegasus ~]# chkconfig hiawatha off
error reading information on service hiawatha: No such file or directory
[root@pegasus ~]# service hiawatha stop
hiawatha: unrecognized service
[root@pegasus ~]#
thats it sir
-
Does this new Kloxo works faster with about 3000 domains ?
-
Now I only have one ip available in DNS - my nameservers do not resolve. The ip is still good - it connects directly to website - yet when using FQDN of site it fails, time outs. The nameservers are not responding. This is a serious problem.
I am still down. The main site I need up is offline. Two other servers down. Can't get anything to work. I am so frustrated.
Newest version of Kloxo broke everything.
-
Check: intodns.com
-
I did. My nameservers are not responding? The ip addresses are fine. They direct link to the sites. But the sites that are not on my main nameserver are not displaying. so only one nameserver is working on my server.
bind is still down. cant change to it. something is really wrong and i can't get it working.
-
I did. My nameservers are not responding? The ip addresses are fine. They direct link to the sites. But the sites that are not on my main nameserver are not displaying. so only one nameserver is working on my server.
bind is still down. cant change to it. something is really wrong and i can't get it working.
I face problem with bind too.
The solution for me:
cd /var/named/chroot/var/named
mkdir dynamic
Try to restart bind and check /var/log/messages for errors
-
there are another way to force login ip to hostname ?
example 1.1.1.1:7778 to server.kloxo.com:7778
-
there are another way to force login ip to hostname ?
example 1.1.1.1:7778 to server.kloxo.com:7778
Possible modify login page.
copy /usr/local/lxlabs/kloxo/httpdocs/login/inc2.php to custom-inc2.php and add after '<?php' with:
<?php
if ($_SERVER['HTTP_HOST'] !== 'server.kloxo.com') {
header( 'Location: http://server.kloxo.com:7778' ) ;
}
...
-
you mean inc or inc2 ?
i cant saw php on inc2
-
if ($_SERVER['HTTP_HOST'] !== 'pegasus.bowo.name') {
header( 'Location: https://pegasus.bowo.name:7777' ) ;
}
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/lxlabs/kloxo/httpdocs/login/index.php:8) in /usr/local/lxlabs/kloxo/httpdocs/login/custom-inc.php on line 4
:lol:
-
Try copy index.php to custom-index.php for add this 'header' to custom-index.php.
-
blank page :D
and for custom-inc.php
not redirect to hostname :)
-
So, inform here 10 lines of custom-index.php content.
-
just read this post :lol:
[root@slave login]# cat custom-index.php
<?php
ini_set("display_errors","1");
// use default index.php
if (!file_exists("./custom-index.php")) {
?>
<?php
if (file_exists("./custom-inc.php")) {
// use user-define inc.php -- no override when kloxo update
$incfile = "./custom-inc.php";
if (file_exists("./custom-inc2.php")) {
$incfile2 = "./custom-inc2.php";
}
}
else {
// use default inc.php
$incfile = "./inc.php";
if (file_exists("./inc2.php")) {
$incfile2 = "./inc2.php";
}
}
?>
<html>
<head>
<title>Kloxo Control Panel</title>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<?php if(isset($incfile2)) { include_once $incfile2 ; } ?>
<style>
body {
font-family: Tahoma, Verdana, Arial, Helvertica, sans-serif;
font-size: 8pt;
font-weight: 100;
background-image:url('./images/abstract.jpg');
background-color:#cccccc;
margin: 0;
}
a {
text-decoration: none;
}
img {
border: 0;
}
img.logo {
margin: 5px;
padding: 0;
}
table.header {
border-collapse: collapse;
border-spacing: 0;
width: 100%;
font-family: Tahoma, Verdana, Arial, Helvertica, sans-serif;
font-size: 8pt;
font-weight: 100;
}
table.content {
border-collapse: collapse;
border-spacing: 0;
width: 100%;
/* height: 100%; */
font-family: Tahoma, Verdana, Arial, Helvertica, sans-serif;
font-size: 8pt;
font-weight: 100%;
}
table.content_body td {
border-collapse: collapse;
border: 1px dashed #cccccc;
font-family: Tahoma, Verdana, Arial, Helvertica, sans-serif;
font-size: 10pt;
color: #444444;
padding:10px;
spacing:0;
}
table.content_title td {
border-collapse: collapse;
border: 0;
font-family: Tahoma, Verdana, Arial, Helvertica, sans-serif;
font-size: 12pt;
color: #336699;
}
</style>
<body>
<table class="header">
<tr>
<td width="100%"><img class="logo" src="./images/logo.png" height="75" alt="hosting-logo"></td>
<td><a href="http://mratwork.com/work/" title="Go to Kloxo-MR website"><img class="logo" src="./images/kloxo-mr.png" alt="kloxo-mr-logo" height="75"></a></td>
</tr>
</table>
<table class="content">
<tr>
<td width="50"> </td>
<td valign="middle" width="100%"><?php include_once $incfile; ?></td>
<td width="50"> </td>
</tr>
</table>
</body>
</html>
<?php
}
else {
// use user-define index.php -- no override when kloxo update
include_once "./custom-index.php";
}
?>
[root@slave login]#
and for custom-inc.php
[root@slave login]# cat custom-inc.php
<?php
if ($_SERVER['HTTP_HOST'] !== 'slave.bowo.name') {
header( 'Location: http://slave.bowo.name:7778' ) ;
}
chdir("..");
include_once "htmllib/lib/displayinclude.php";
$kloxo_mr_version = $sgbl->__ver_full;
init_language();
$cgi_clientname = $ghtml->frm_clientname;
$cgi_class = $ghtml->frm_class;
$cgi_password = $ghtml->frm_password;
$cgi_forgotpwd = $ghtml->frm_forgotpwd;
$cgi_email = $ghtml->frm_email;
$cgi_classname = 'client';
if ($cgi_class) {
$cgi_classname = $cgi_classname;
}
$accountlist = array('client' => "Kloxo Account", 'domain' => 'Domain Owner', 'mailaccount' => "Mail Account");
$progname = $sgbl->__var_program_name;
if ($sgbl->is_this_slave()) {
print("Slave Servern");
exit;
}
$logfo = db_get_value("general", "admin", "login_pre");
$logfo = str_replace("<%programname%>", $sgbl->__var_program_name, $logfo);
if (!$cgi_forgotpwd) {
$ghtml->print_message();
?>
<!--- include start --->
<div align="center">
<div class="login">
<div class="login-form">
<div align="center"><font size="5" color="red"><b> Login </b></font></div>
<br/>
<form name="loginform" action="/htmllib/phplib/" onsubmit="encode_url(loginform) ; return fieldcheck(this);"
method="post">
<div class="form-block">
<div class="inputlabel">Username</div>
<input name="frm_clientname" type="text" class="inputbox" size="30"/>
<div class="inputlabel">Password</div>
<input name="frm_password" type="password" class="passbox" size="30"/>
<br/>
<input type="hidden" name="id" value="<?php echo mt_rand() ?>"/>
<div align="left"><input type="submit" class="button" name="login" value="Login"/></div>
</div>
</form>
</div>
<div class="login-text">
<div class="ctr"><img src="/img/login/icon.gif" width="64" height="64" alt="security"/></div>
<?=$logfo?>
<a class="forgotpwd" href="javascript:document.forgotpassword.submit()"><font color="black"><u>Forgot
Password?</u></a>
<form name="forgotpassword" method="post" action="/login/">
<input type="hidden" name="frm_forgotpwd" value="1"/>
</form>
<script> document.loginform.frm_clientname.focus(); </script>
</div>
<div class="clr"></div>
</div>
<span align="right">Kloxo-MR <?php echo $kloxo_mr_version ?></span>
</div>
<div id="break"></div>
<?php
if (if_demo()) {
print("<div align='center'>");
include_once "lib/demologins.php";
print("</div>");
} else {
}
} elseif ($cgi_forgotpwd == 1) {
?>
<div align="center">
<div class="login">
<div class="login-form">
<div align="center"><font name=Verdana size=5 color=red><b> Forgot Password </b></font></div>
<br/>
<form name="sendmail" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<div class="form-block">
<div class="inputlabel">Username</div>
<input name="frm_clientname" type="text" class="inputbox" size="30"/>
<div class="inputlabel">Email Id</div>
<input name="frm_email" type="text" class="passbox" size="30"/>
<br/>
<input type="hidden" name="frm_forgotpwd" value="2"/>
<div align="left"><input type="submit" class="button" name="forgot" value="Send"/></div>
</div>
</form>
</div>
<div class="login-text">
<div class="ctr"><img src="/img/login/icon1.gif" width="64" height="64" alt="security"/></div>
<p>Welcome to <?php echo $sgbl->__var_program_name; ?></p>
<p>Use a valid username and email-id to get password.</p>
<br/>
<a class=forgotpwd href="javascript:history.go(-1);"><font color="black"><u>Back to login</u></a>
</div>
<script> document.sendmail.frm_clientname.focus(); </script>
<div class="clr"></div>
</div>
<span align="right">Kloxo-MR <?php echo $kloxo_mr_version ?></span>
</div>
<div id="break"></div>
<?php
} elseif ($cgi_forgotpwd == 2) {
$progname = $sgbl->__var_program_name;
$cprogname = ucfirst($progname);
$cgi_clientname = $ghtml->frm_clientname;
$cgi_email = $ghtml->frm_email;
htmllib::checkForScript($cgi_clientname);
$classname = $ghtml->frm_class;
if (!$classname) {
$classname = getClassFromName($cgi_clientname);
}
if ($cgi_clientname != "" && $cgi_email != "") {
$tablename = $classname;
$rawdb = new Sqlite(null, $tablename);
$email = $rawdb->rawQuery("select contactemail from $tablename where nname = '$cgi_clientname';");
if ($email && $cgi_email == $email[0]['contactemail']) {
$rndstring = randomString(8);
$pass = crypt($rndstring);
$rawdb->rawQuery("update $tablename set password = '$pass' where nname = '$cgi_clientname'");
$mailto = $email[0]['contactemail'];
$name = "$cprogname";
$email = "Admin";
$cc = "";
$subject = "$cprogname Password Reset Request";
$message = "nnnYour password has been reset to the one below for your $cprogname login.n";
$message .= "The Client IP address which requested the Reset: {$_SERVER['REMOTE_ADDR']}n";
$message .= 'Username: ' . $cgi_clientname . "n";
$message .= 'New Password: ' . $rndstring . '';
//$message = nl2br($message);
lx_mail(null, $mailto, $subject, $message);
$ghtml->print_redirect("/login/?frm_smessage=password_sent");
} else {
$ghtml->print_redirect("/login/?frm_emessage=nouser_email");
}
}
}
?><!--- include end --->
[root@slave login]#
-
Instead using custom-inc.php, better using custom-index.php and placing:
if ($_SERVER['HTTP_HOST'] !== 'slave.bowo.name') {
header( 'Location: http://slave.bowo.name:7778' ) ;
}
in after '<?php'.
and delete custom-inc.php (no needed) and because back to use inc.php.
-
done :D
but still blank page
[root@slave login]# cat custom-index.php
<?php
if ($_SERVER['HTTP_HOST'] !== 'slave.bowo.name') {
header( 'Location: http://slave.bowo.name:7778' ) ;
}
ini_set("display_errors","1");
// use default index.php
if (!file_exists("./custom-index.php")) {
?>
<?php
if (file_exists("./custom-inc.php")) {
// use user-define inc.php -- no override when kloxo update
$incfile = "./custom-inc.php";
if (file_exists("./custom-inc2.php")) {
$incfile2 = "./custom-inc2.php";
}
}
else {
// use default inc.php
$incfile = "./inc.php";
if (file_exists("./inc2.php")) {
$incfile2 = "./inc2.php";
}
}
?>
-
work now :D
it cant process by adding : custom-index.php
but possible still use index.php
-
Use this code for custom-index.php (no change for other files or create other custom files):
<?php
if ($_SERVER['HTTP_HOST'] !== 'testing.potissima.com') {
header( 'Location: http://testing.potissima.com:7778/' ) ;
}
// ini_set("display_errors","1");
// use default index.php
// if (!file_exists("./custom-index.php")) {
?>
<?php
if (file_exists("./custom-inc.php")) {
// use user-define inc.php -- no override when kloxo update
$incfile = "./custom-inc.php";
if (file_exists("./custom-inc2.php")) {
$incfile2 = "./custom-inc2.php";
}
}
else {
// use default inc.php
$incfile = "./inc.php";
if (file_exists("./inc2.php")) {
$incfile2 = "./inc2.php";
}
}
?>
<html>
<head>
<title>Kloxo Control Panel</title>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<?php if(isset($incfile2)) { include_once $incfile2 ; } ?>
<style>
body {
font-family: Tahoma, Verdana, Arial, Helvertica, sans-serif;
font-size: 8pt;
font-weight: 100;
background-image:url('./images/abstract.jpg');
background-color:#cccccc;
margin: 0;
}
a {
text-decoration: none;
}
img {
border: 0;
}
img.logo {
margin: 5px;
padding: 0;
}
table.header {
border-collapse: collapse;
border-spacing: 0;
width: 100%;
font-family: Tahoma, Verdana, Arial, Helvertica, sans-serif;
font-size: 8pt;
font-weight: 100;
}
table.content {
border-collapse: collapse;
border-spacing: 0;
width: 100%;
/* height: 100%; */
font-family: Tahoma, Verdana, Arial, Helvertica, sans-serif;
font-size: 8pt;
font-weight: 100%;
}
table.content_body td {
border-collapse: collapse;
border: 1px dashed #cccccc;
font-family: Tahoma, Verdana, Arial, Helvertica, sans-serif;
font-size: 10pt;
color: #444444;
padding:10px;
spacing:0;
}
table.content_title td {
border-collapse: collapse;
border: 0;
font-family: Tahoma, Verdana, Arial, Helvertica, sans-serif;
font-size: 12pt;
color: #336699;
}
</style>
<body>
<table class="header">
<tr>
<td width="100%"><img class="logo" src="./images/logo.png" height="75" alt="hosting-logo"></td>
<td><a href="http://mratwork.com/work/" title="Go to Kloxo-MR website"><img class="logo" src="./images/kloxo-mr.png" alt="kloxo-mr-logo" height="75"></a></td>
</tr>
</table>
<table class="content">
<tr>
<td width="50"> </td>
<td valign="middle" width="100%"><?php include_once $incfile; ?></td>
<td width="50"> </td>
</tr>
</table>
</body>
</html>
<?php
/*
}
else {
// use user-define index.php -- no override when kloxo update
include_once "./custom-index.php";
}
*/
?>
-
work now :D hahaha
-
You must change 'testing.potissima.com' to your domain address.