Category Archives: Hosting

cloudflare style SNI proxy


git clone https://github.com/dlundquist/sniproxy.git

yum groupinstall "Development Tools"
yum install autoconf automake curl gettext-devel libev-devel pcre-devel perl pkgconfig rpm-build udns-devel
cd sniproxy
./autogen.sh && ./configure && make dist
rpmbuild --define "_sourcedir `pwd`" -ba redhat/sniproxy.spec
yum install /root/rpmbuild/RPMS/x86_64/sniproxy-0.6.0+git.10.g822bb80-1.el7.x86_64.rpm
sniproxy -c /etc/sniproxy.conf

Centos 7 x86_64:
sniproxy-0.6.0+git.10.g822bb80-1.el7.x86_64.rpm.gz

die [Internal Death while parsing ./webmail/paper_lantern/index.html 2429281] Template::Exception:


[TYPE]=[file]
[INFO]=[mail_clients/mail_clients.tt: not found]
[TEXT]=[]
at cpanel.pl line 1126.
cpanel::cpanel::cptt_exectag("/usr/local/cpanel/base/webmail/paper_lantern/index.auto.tmpl", 1) called at cpanel.pl line 4606
cpanel::cpanel::run_standard_mode() called at cpanel.pl line 930
cpanel::cpanel::script("cpanel::cpanel", "-webmail", "./webmail/paper_lantern/index.html") called at cpanel.pl line 32

info [webmaild] show_template.stor lacked output with exit code: 127 at /usr/local/cpanel/Cpanel/Server.pm line 1381.
Cpanel::Server::process_login_template(Cpanel::Server=HASH(0x29ce220), __CPANEL_HIDDEN__, __CPANEL_HIDDEN__, 1, __CPANEL_HIDDEN__, undef, __CPANEL_HIDDEN__, 1, ...) called at /usr/local/cpanel/Cpanel/Server.pm line 2085
Cpanel::Server::process_and_send_login_template(Cpanel::Server=HASH(0x29ce220), "login", "HTTP/1.1 200 OK\x{d}\x{a}Set-Cookie: webmailrelogin=no; HttpOnly; exp"..., HASH(0x2cb1658)) called at /usr/local/cpanel/Cpanel/Server.pm line 926
Cpanel::Server::badpass(Cpanel::Server=HASH(0x29ce220), __CPANEL_HIDDEN__, 1, __CPANEL_HIDDEN__, 1) called at cpsrvd.pl line 5402
cpanel::cpsrvd::handle_auth() called at cpsrvd.pl line 1332
cpanel::cpsrvd::handle_one_connection(11) called at cpsrvd.pl line 1114
cpanel::cpsrvd::script() called at cpsrvd.pl line 434

Failed to show template “login” in login theme “cpanel” (); falling back to legacy login. at /usr/local/cpanel/Cpanel/Server.pm line 2089.

Solution cloud be:
cd /usr/local/cpanel/base/frontend
mv -v paper_lantern paper_lantern_backup
/usr/local/cpanel/scripts/upcp --force

mounted filesystem discovery exclude zabbix

If you want to exclude all cagefs-skeleton or some other virtfs, bind mounts and etc

zabbix_get -s xx.xx.xx.xx -k vfs.fs.discovery

“{#FSNAME}”:”\/usr\/share\/cagefs-skeleton\/dev\/pts”,
“{#FSTYPE}”:”devpts”},

“{#FSNAME}”:”\/usr\/share\/cagefs-skeleton\/dev\/shm”,
“{#FSTYPE}”:”tmpfs”},

“{#FSNAME}”:”\/usr\/share\/cagefs-skeleton\/lib”,
“{#FSTYPE}”:”ext4″},

Administration -> General -> Regular expressions -> New regular expression

Name: File systems for discovery – exclude cagefs
Expressions
Expression type: [Result is FALSE]
Expression: /cagefs-skeleton

Configuration -> Templates -> Template OS Linux -> Discovery rules -> Mounted filesystem discovery -> Filters -> Add
Type of calculation: A and B
A: {#FSNAME} matches @File systems for discovery – exclude cagefs
b: {#FSTYPE} matches @File systems for discovery

Also you need readd host to rediscover all mounted filesystems

systemd[1]: Can’t open PID file /var/run/pure-ftpd.pid (yet?) after start: Too many levels of symbolic links

systemd[1]: Can’t open PID file /var/run/pure-ftpd.pid (yet?) after start: Too many levels of symbolic links
systemd[1]: pure-ftpd.service start operation timed out. Terminating.
systemd[1]: Failed to start Pure-FTPd FTP server.
systemd[1]: Unit pure-ftpd.service entered failed state.
systemd[1]: pure-ftpd.service failed.

vi /usr/lib/systemd/system/pure-ftpd.service

[Service]
Type=forking
#PIDFile=/var/run/pure-ftpd.pid
PIDFile=/run/pure-ftpd.pid
ExecStart=/usr/sbin/pure-config.pl /etc/pure-ftpd/pure-ftpd.conf –daemonize

systemctl daemon-reload
systemctl start pure-ftpd

yum install php without httpd

yum install php-cli

Installing:
php-cli x86_64 7.3.18-1.el6.remi remi-php73 4.4 M
Installing for dependencies:
libargon2 x86_64 20161029-7.el6.remi remi 21 k
php-common x86_64 7.3.18-1.el6.remi remi-php73 1.1 M
php-json x86_64 7.3.18-1.el6.remi remi-php73 65 k

Transaction Summary
Install 4 Package(s)
Total download size: 5.6 M