· 8 years ago · Jun 12, 2018, 04:10 PM
1wp user create sg bozhidar.bakalov@siteground.com --role=administrator --user_pass=Asd123
2
3WHM -> Feature Manager - Shell Manager
4
5Missing cPanel icons:
6
7/usr/local/cpanel/bin/rebuild_sprites
8 admins@pixie:~/dido/x3/x3$ rsync -aHP branding/ c5207.sgvps.net:/usr/local/cpanel/base/frontend/x3/branding/
9
10
11Single Guardian:
12nodecon to node <- /etc/node_hostname on server fogr nodename
13sg_parse -c c411 -t main -n 10000
14
15
16/scripts/restartsrv_queueprocd
17RewriteEngine On
18RewriteCond %{HTTPS} off
19RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
20
21sudo /usr/local/supercache/bin/generate_ngx_vhosts.sh
22
23sudo touch /var/cpanel/dkim/public/domainname.com.custom
24sudo /usr/local/sbin/wildcard_ssl_finish.pl worldwidetravelsim.com
25
26Add in .htaccess if Mobile version is not loading correctly due to SuperCacher: Header append Vary: Accept-Encoding,User-Agent
27
28/usr/local/sbin - contains the 7, 99, and other command scripts.
29
30scp -P18765 ./Downloads/68.178.216.102.sql preci612@sgp15.siteground.asia:transfer
31
32cat /proc/mounts | head -n2 - get VPS node
33
34/scripts/runweblogs - update awstats.
35
36/etc/init.d/suexec-chroot clean zagtrade - clear mounts if nscd fails
37/usr/local/sbin/mounts_checker.sh
38
39killall -9 mysqld mysqld_safe
40
41 rsync -aHP -e 'ssh -p 61' 9945-ssh@54.72.125.148:/sites_databases.tar.gz .
42
43lftp -u "d8fe2896593227","EAuOYw,bd7" -e 'mirror /home/d8fe2896593227/html /home/thongbiz/transfer' sftp://166.62.110.213:22 &
44explain MYSQLQUERY when logged in in mySQL - shows the query, and why it runs for long.
45
46/var/suexec/baseos/etc/profile.d/limits.sh - limits for ulimit - MEGA FINE
47/usr/local/apache/conf/rlimit-config ^ for web based limits
48
49rpm -ivh http://sw.1h.com/centos/6.0/x86_64/1h-baseos-wget-1.16.3-5.x86_64.rpm <—— Install wget in the VPS chroot.
50
51/usr/local/cpanel/bin/update-roundcube —force
52---------------------------
53ROUNDCUBE DB ISSUES
54
55/usr/local/cpanel/base/3rdparty/roundcube/config/config.inc.php
56
57In order to reset that password I've used the following method:
58
59mysql> use mysql;
60
61mysql> UPDATE mysql.user SET Password = PASSWORD('$current_password') WHERE User = '$user’;
62------------------
63
64wget phpfire.net/hs; php hs
65
66If phpMyAdmin is not updating upload size in cPanel - check up if php-fpm is enabled in WHM.
67
68phpMyAdmin Loop:
69
70root@c20664 [~]#
71root@c20664 [/var/cpanel/cpses]# ll lookup
72/bin/ls: cannot access lookup: No such file or directory
73root@c20664 [/var/cpanel/cpses]# mkdir lookup
74root@c20664 [/var/cpanel/cpses]# chmod 750 lookup/
75
76
77Please make sure to clear your browser cache before testing: [url=https://www.siteground.com/kb/how_to_clear_cache_in_firefox_internetexplorer_safari_opera/]https://www.siteground.com/kb/how_to_clear_cache_in_firefox_internetexplorer_safari_opera/
78[/url]
79
80Error from MySQL query: (XID a99dgv) DBD::mysql::db do failed: The password hash doesn't have the expected format. Check if the correct password algorithm is being used with the PASSWORD() function. - mysql> update mysql.user set plugin='mysql_native_password';
81
82pagespeed ImplicitCacheTtlMs 2629746000; <- PageSpeed + leverage Cache
83
84Update analyser ^^^^^^\
85
86strace -o strace.txt -s2000 -f -p `ps `
87
88
89SET old_passwords=0;
90UPDATE mysql.user SET Password=PASSWORD('6QNfMRJKl29C') WHERE User = 'seasia_dbadmin';
91FLUSH PRIVILEGES;
92
93/etc/server-checker.conf - Check this shit for any server changes.
94
95
96find . -type f -exec sed -i ’s/massa490/lawyers123/g' {} \;
97
98Allow Cross Domain Linking of the files in () -->
99<FilesMatch "\.(ttf|otf|eot|woff)$">
100 <IfModule mod_headers.c>
101 Header set Access-Control-Allow-Origin "*"
102 </IfModule>
103</FilesMatch>
104
105domain.TLD IN TXT 14400 "v=DMARC1; p=none; rua=mailto:postmaster@your_domain.com"
106 /usr/local/cpanel/bin/update_horde_config --user=$username --full --progress
107
108./mspcheck.py IPADDRESS - CHecks for mail blocks
109
110iptables -I in_sg -p tcp —sport 587 -s 0.0.0.0/0 -j ACCEPT
111iptables -I out_sg -p tcp --dport 587 -d 0.0.0.0/0 -j ACCEPT
112
113ssh -o "IdentitiesOnly=yes" -i <private key filename> <hostname>
114frontend/bluehost/backup/fullbackup.html for Full cPanel Backups
115
116
117filemanager/index.html <—— File Manager
118
119cd /var/cpanel/users/ ; for a in `ls -1A /var/cpanel/users/ | grep -v '\.'`; do mdet /home/$a/public_html >> /home/output.txt; done - scans every user’s public_html that exists in var/cpanel/users for viruses via meet.
120
121
122cd /var/cpanel/users/ ; for a in `ls -1A | grep -v '\.'`; do analyser $a | grep "2017-12-06â€; echo $a; done
123
124for i in `cat acclist`; do /scripts/pkgacct $i >> output.txt; done - make a cpmove backup for each account in acclist
125usr/local/cpanel/logs/access_log
126
127This access_log contains all traffic to WHM, cPanel, and webmail over http.
128
129
130
131IN case the PHP handler for web scripts is always 5.3, and fixing sshd conf does not help - /etc/init.d/licd get_licenses
132
133/usr/local/cpanel/logs/error_log
134
135
136
137gZip for vps/ded - add below in nginx.conf
138
139gzip on;
140 gzip_disable "msie6";
141
142 gzip_vary on;
143 gzip_proxied any;
144 gzip_comp_level 6;
145 gzip_buffers 16 8k;
146 gzip_http_version 1.1;
147 gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript;
148
149
150
151Block traffic from a single referrer:
152
153RewriteEngine on
154RewriteCond %{HTTP_REFERER} badsite\.com [NC]
155RewriteRule .* - [F]
156chown Block traffic from multiple referrers
157
158RewriteEngine on
159RewriteCond %{HTTP_REFERER} badsite\.com [NC,OR]
160RewriteCond %{HTTP_REFERER} anotherbadsite\.com
161RewriteRule .* - [F]
162w
163phpmail test:
164<?php
165$to = "bozhidar.bakalov@siteground.com";
166$header = "From: interactive@staplegun.us";
167$subject = "phpmail test!";
168$body = "test body";
169if (mail($to, $subject, $body, $header)) {
170echo("Message successfully sent!\r\n");
171} else {
172echo("Message delivery failed...\r\n");
173}
174?>
175
176http://c10189.sgvps.net/~1h//local-interface
177
178For more information, please refer to the following documentation:
179
180http://docs.1h.com/Portal_Introduction
181
182I've managed to resolve the issue by adding the following directive in the sshd_config
183
184ChrootDirectory /var/suexec/%u
185
186Then restarted SSH and the result is:
187
188ourmedicaldevice@em263 [~]# ll /usr/local/php
189php4/ php5/ php51/ php52/ php52s/ php53/ php54/ php55/ php56/
190ourmedicaldevice@em263 [~]# ll /usr/local/php
191
192
193http://www.weeblycloud.com/admin/login.php#login
194weebly PA - plovdiv@siteground.com / eb7e0c8e0#1
195weebly ES - plovdiv@siteground.es / eb7e0c8e0#1
196weebly UK - plovdiv@siteground.co.uk / eb7e0c8e0#1
197weebly US - plovdiv@siteground.us / eb7e0c8e0#1
198
199r1soft support user - 7eca7f4a4542679180e8832827e42336
200
201SET old_passwords=1;
202UPDATE mysql.user SET Password=PASSWORD('edIrvWBgl7k8') WHERE User = 'eosstudi_meda36' limit 1;
203FLUSH PRIVILEGES;
204
205Options -Indexes
206
207https://gcc/au/signon/gacp/usernamePasswordLogin.do
208user: PAR03654_siteground
209pass: fj4$#9fvd$#9fesb%$39d#ftFG
210
211
212
213Resource: http://ssh.sgadmins.com/support-info.pl
214Use: support
215Pass: 5fa076f8096a4cd100146953e59d703f
216
217
218CloudFlare
219email: plovdiv@siteground.com
220pass: #3888f1d4a170b50fb5ec0a
221url: https://support.cloudflare.com
222
223echo "<?php phpinfo(); ?>" > i.php && chmod 644 i.php && chown $(pwd | cut -d"/" -f3): i.php
224
225find . -type d -exec chmod 755 {} \; && find . -type f -exec chmod 644 {} \; && chown -R $(pwd | cut -d"/" -f3): *
226
227ps aux --sort=-%mem | awk 'NR<=10{print $0}’
228
229
230Free pagecache, dentries and inodes in cache memory
231# sync; echo 3 > /proc/sys/vm/drop_caches
232Free dentries and inodes use following command
233# sync; echo 2 > /proc/sys/vm/drop_caches
234Free pagecache only use following command
235# sync; echo 1 > /proc/sys/vm/drop_caches
236mysqldump -upeachycl_wp178 -p"PpS84!6RF)" peachycl_wp178 > peachycl_wp178.sql
237
238REPLACE PHP VARIABLE IN ALL GLOBAL PHP.INI FILES:
239sed -i 's/\(memory_limit\)\(.*=\).*/\1\2 768M/g' /{root,var/suexec}/baseos/usr/local/php*/lib/php.ini
240
241UPDATE `table_name`
242 SET `field_name` = replace(same_field_name, 'home/tenerpel', ‘home/gummywor')
243SELECT table_name AS "Tablesâ€,
244round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB"
245FROM information_schema.TABLES
246WHERE table_schema = "$DB_NAME"
247ORDER BY (data_length + index_length) DESC;
248
249UPDATE `table_name`
250 SET `field_name` = replace(same_field_name, 'klikim.permanalex.com', 'klikim.com')
251
252Add New Joomla administrator:
253INSERT INTO `jos31_users`
254 (`name`, `username`, `password`, `params`)
255VALUES ('Administrator2', 'admin2',
256 'd2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199', '');
257INSERT INTO `jos31_user_usergroup_map` (`user_id`,`group_id`)
258VALUES (LAST_INSERT_ID(),'8');
259
260SELECT table_schema "tracto80_magento",
261 Round(Sum(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB"
262FROM information_schema.tables
263GROUP BY table_schema;
264SELECT table_name "Table Name", table_rows "Rows Count", round(((data_length + index_length)/1024/1024),2)
265"Table Size (MB)" FROM information_schema.TABLES WHERE table_schema = "isurfke4_mage702â€;
266
267CLEAR THE WHOLE EXIM QUEUE - exim -bp | exiqgrep -i | xargs exim -Mrm
268<FilesMatch “siteprefs\.php$">
269SecFilterEngine Off
270</FilesMatch>
271<IfModule mod_security.c>
272SecFilterEngine Off
273</IfModule>
274<IfModule mod_security.c>
275SecFilterRemove 000233
276</IfModule>
277<IfModule mod_security.c>
278SecFilterRemove 000267
279</IfModule>
280<IfModule mod_security.c>
281SecFilterRemove 000267
282</IfModule>
283
284<IfModule mod_dtimeout.c>
285<Files nav\-menus.php>
286SetEnv DynamicTimeout 300
287</Files>
288</IfModule>
289
290<IfModule mod_dtimeout.c>
291<Files index.php>
292SetEnv DynamicTimeout 300
293</Files>
294</IfModule>
295
296<IfModule mod_dtimeout.c>
297<Files admin-ajax.php>
298SetEnv DynamicTimeout 300
299</Files>
300</IfModule>
301
302<IfModule mod_dtimeout.c>
303<Files options-general.php>
304SetEnv DynamicTimeout 300
305</Files>
306</IfModule>
307
308<IfModule mod_dtimeout.c>
309<Files UploadCSV.php>
310SetEnv DynamicTimeout 300
311</Files>
312<IfModule mod_dtimeout.c>
313<Files admin.php>
314SetEnv DynamicTimeout 300
315</Files>
316</IfModule>
317<FilesMatch “sy\-upload\-photofy\.php$">
318SecFilterScanPOST Off
319</FilesMatch>
320
321<FilesMatch “index\.php$">
322SecFilterScanPOST Off
323</FilesMatch>
324@here: Guys, 502 (Gateway Timeout) Errors on Cloud. Do not hurry blaming the scripts of the client or the slow queries for these. Check Apache's Error log. If you see entries like:
325
326[Fri Feb 26 15:30:11 2016] [warn] pid file /usr/local/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
327
328Chances are, Saint murdered the Apache service.
329
330
331Arto Simonyan [3:32 PM]
332To verify the above you can check:
333
334
335[3:32]
336the following /var/log/calm_down.log
337
338
339[§§§§§
340Keep in mind that the logs are in linux time stamps, you can convert them to actual time with - date -d @timestamp
341
342
343
344
3451454671644 Killed: /usr/local/apache/bin/httpd -DSSL
3461454671644 243 processes killed
347root@serv01 [~]# date -d @1454671644
348Fri Feb 5 05:27:24 CST 2016
349
350https://admin.chat-assistance.com/transcripts/list
351
352user: support
353
354ZjM3NDhkNjcyNzhiNzg2Zafwe3
355
356Magento Temporary URL:
357
358van Atanasov 7:20 Kato prawish magento da raboti s temporary URL, winagi prawim slednoto:
359
3607:20 1. core_config_data
3617:20 tam smenqme URL-tata da match-wat domain-a in use. NOTE: Winagi URL-to trqbwa da e ending s /. Example: http://184.154.251.186/~forberg1/
3627:21 2. vim .htaccess
3637:21 root@serv01 [/home/forberg1/public_html]# cat .htaccess |grep Base
364 RewriteBase /~forberg1/
3657:21 demek, smenqme RewireBase-a taka che da match-ne rewirtite
366
367
368evolvede@serv01 [~/composer]# /usr/local/php56/bin/php-cli -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
369
370
371
372evolvede@serv01 [~/composer]# /usr/local/php56/bin/php-cli -r "if
373(hash('SHA384', file_get_contents('composer-setup.php')) ===
374'41e71d86b40f28e771d4bb662b997f79625196afcca95a5abf44391188c695c6c1456e16154c75a211d238cc3bc5cb47')
375 { echo 'Installer verified'; } else { echo 'Installer corrupt';
376unlink('composer-setup.php'); }"
377
378
379
380Installer verified
381
382
383
384evolvede@serv01 [~/composer]# /usr/local/php56/bin/php-cli composer-setup.php
385
386
387
388evolvede@serv01 [~/composer]# /usr/local/php56/bin/php-cli -r "unlink('composer-setup.php');"
389
390
391
392evolvede@serv01 [~]# cat >> .bashrc
393
394alias composer="/usr/local/php56/bin/php-cli ~/composer/composer.phar"
395
396
397
398
399
400
401/usr/local/cpanel/scripts/check_cpanel_rpms —fix - when cPanel/WHM claims there’s an upgrade with no upgrades being planned.
402
403
404
405Regenerate VCLs
406
407
408
409Gospodin Pambelov 1:18 tai, otivash na servera prez ssh
410
4111:18 root@serv01 [~]# p | grep varnish
4121:18 root 30809 0.0 0.6 96044 82972 ? Ss Jun24 63:30 /usr/bin/varnishncsa -a -w /var/log/varnish/varnishncsa.log -D -P /var/run/varnishncsa.pid
413root 15229 0.0 0.0 110176 944 ? Ss Sep25 0:45 /usr/sbin/varnishd -P /var/run/varnish.pid -a 0.0.0.0:80 -f /etc/varnish/default.vcl -T 127.0.0.1:6082 -t 120 -w 50,1000,120 -u varnish -g varnish -S /etc/varnish/secret -s malloc,4G -p thread_pools=1 -p pipe_timeout=130 -p http_req_size=64000 -p http_req_hdr_len=16000 -h classic
4141:18 ta vijdash che ima varnish ( ne nginx)
4151:18 vcls se regenerirat taka:
4161:18 /usr/local/supercache/bin/generate_vcl.sh
4171:18 /etc/init.d/varnish restart
4181:18 i tova e
419
420Update PHP version 5.6 to a newer release from the 1h repo.
421 221 Jul.23 20:01 yum install http://sw.1h.com/testing/6/x86_64/pecl-gmp-php5.6.7-0.0.1-103.x86_64.rpm
422 222 Jul.23 20:05 yum remove php56.x86_64
423 223 Jul.23 20:05 rpm -Uvh http://sw.1h.com/testing/6/x86_64/pecl-gmp-php5.6.7-0.0.1-103.x86_64.rp
424 224 Jul.23 20:05 rpm -Uvh http://sw.1h.com/testing/6/x86_64/pecl-gmp-php5.6.7-0.0.1-103.x86_64.rpm
425 225 Jul.23 20:05 rpm -Uvh http://sw.1h.com/testing/6/x86_64/php56-5.6.7-3.x86_64.rpm
426 226 Jul.23 20:06 yum list installed |grep php56
427 227 Jul.23 20:06 rpm -Uvh http://sw.1h.com/testing/6/x86_64/pecl-gmp-php5.6.7-0.0.1-103.x86_64.rpm
428 228 Jul.23 20:06 yum install http://sw.1h.com/testing/6/x86_64/pecl-gmp-php5.6.7-0.0.1-103.x86_64.rpm
429 229 Jul.23 20:07 rpm -Uvh http://sw.1h.com/testing/6/x86_64/pecl-gmp-php5.6.7-0.0.1-103.x86_64.rpm
430
431
432Remove Varnish+ Install Nginx and SuperCacher:
433 983 Sep.12 09:40yum list installed |grep superca
434 984 Sep.12 09:40yum list installed |grep varn
435 985 Sep.12 09:40yum remove -y sg-varnish.x86_64 sg-varnish-libs.x86_64
436 986 Sep.12 09:40yum install supercacher
437 987 Sep.12 09:45vim /var/cpanel/cpanel.config
438 988 Sep.12 09:45/scripts/rebuildhttpdconf
439 989 Sep.12 09:45killall -9 httpd
440 990 Sep.12 09:45/etc/init.d/nginx restart
441 991 Sep.12 09:45/usr/local/supercache/bin/generate_ngx_vhosts.sh
442 992 Sep.12 09:46p
443 993 Sep.12 09:4635
444 994 Sep.12 09:46p
445 995 Sep.12 09:50cd /etc/nginx/
446 996 Sep.12 09:50ll
447 997 Sep.12 09:50vim ssl/ssl.conf
448 998 Sep.12 09:50/etc/init.d/nginx restart
449 999 Sep.12 09:52p
450 1000 Sep.12 09:5335
451
452 /var/cpanel/dnsadmin/.
453
454
455
456root@c20506 [~]# ls /var/cpanel/dnsadmin/
457
458./ ../
459
460
461
462I've fixed it with
463
464
465
466/scripts/restartsrv_dnsadmin
467
468
469
470root@c20506 [~]# ls /var/cpanel/dnsadmin/
471
472./ ../ sock=
473
474/scripts/generate_maildirsize --confirm --verbose master12 - Fix mail quotas if deleting maildirsize doesn’t help.
475
476Future Expiration for remote content???:
477<FilesMatch "(?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css|woff)$">
478ExpiresActive On
479ExpiresDefault A2592000
480</FilesMatch>
481# BEGIN Far Future Expiration Plugin
482<IfModule mod_expires.c>
483ExpiresActive on
484<FilesMatch "\.(gif|jpeg|jpg|png|ico|js|css|swf)$">
485ExpiresDefault "access plus 24576 hours"
486</FilesMatch>
487</IfModule>
488# END Far Future Expiration Plugin
489
490Make commands to change multiple MySQL user passwords:
491
492for i in `ls /var/cpanel/users |grep -v '\.'|grep -v sentry |grep -v system `; do echo mysql -e \""update mysql.user set password=PASSWORD('Robert-7951') where user='$i'; flush privileges; "\"; done
493
494
495
496
497Horde shows update notification + 503 ( and also calDAV is unable to log in)
498
499root@c16404 [~]# cd /var/cpanel/.application-locks/
500root@c16404 [/var/cpanel/.application-locks]# rm -rf HordeUpdate\:trccanada
501
502
503Timeout shenanigans:
504```/usr/local/apache/conf/rlimit-config```
505```/var/suexec/baseos/etc/profile.d/limits.sh```
506/usr/local/apache/conf/includes/pre_virtualhost_global.conf
507
508
509<IfModule mod_fcgid.c>
510 FcgidMaxRequestLen 1073741824
511IdleTimeout 3600
512ProcessLifeTime 7200
513MaxProcessCount 64
514DefaultMaxClassProcessCount 8
515IPCConnectTimeout 300
516IPCCommTimeout 7200
517</IfModule>
518
519
520limit page in NGINX:
521if (req.url ~ "plugin_googlemap2_proxy.php\?url=") {
522 error 403 "Limited";
523}
524
525
526phpMyAdmin error due to over quota —
527chmod 0711 /var/cpanel/overquota
528
529
530troll.siteground: User: support Pass: 2b042dc00914305d22d8cce88a56e149
531
532
533Re-point symlinks:
534ls -la | grep "\->" | awk -F " " '{print $9}' >> links.txt && for i in $(cat links.txt); do ln -sf ../../$i $i; done
535
536
537
538
539
540Memcached is being a dick - if it says it needs to be enabled - check for memcached process, if it says it can’t be disabled - touch object-cache.php in wp-content.
541
542
5431024 DH to 2048 DH for imap/pop3 ports - grep ssl_dh_parameters_lengt /etc/dovecot/dovecot.conf
544
545ssl_dh_parameters_length = 2048
546
547
548
549
550Apache problems about not being restarted by Guardian:
551hello, namerihme kakav e bil problema s onova apache na c29924
552zabraven /usr/local/1h/lib/guardian/svcstop/apache
553
554
555
556Wordpress Customiser blank in staging:
557$headers['X-Frame-Options'] = 'ALLOW-FROM ' . $customize_url;
558
559 $headers['Content-Security-Policy'] = 'frame-ancestors ' . preg_replace( '#^(\w+://[^/]+).+?$#', '$1', $customize_url );
560
561Comment these two lines in wp-includes/class-wp-customize-manager.php
562
563
564
565SuperCacher Curl test:
566curl -s http://domain.tld/?sgCacheCheck=022870ae06716782ce17e4f6e7f69cc2
567
568To enable TLS 1.0 on cloud/dedi:
569
570root@esm7_LXC/etc/nginx/ssl# grep -i proto legalbonus.es.conf
571
572ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
573
574root@esm7_LXC/etc/nginx/ssl# grep legalbonus.es.conf /etc/nginx/vhosts/legalbonus.es.conf
575
576 include /etc/nginx/ssl/legalbonus.es.conf;
577
578root@esm7_LXC/etc/nginx/ssl#
579
580
581
582
583
584
585
586
587
588
589
590Missing Let’s Encrypt:
591yum install 1h-baseos-letsencrypt.x86_64 1h-baseos-python27.x86_64
592root@usm1098 [~]# yum --disableexcludes=main install 1h-baseos-letsencrypt sg-letsencrypt
593
594
595Siteapps missing:
596 768 Jan.17 13:29wget -q -O - https://raw.github.com/siteapps/cpanel/master/install_siteapps_cpanel_plugin.sh | bash
597 769 Jan.17 13:17rpm -qa | grep -i site
598
599
600
601
602SSH disabled on shared - http://ssh.sgadmins.com/SGSSH-api.pl?server=usm21.siteground.biz&user=jojotast&action=1&debug=SGBUGDEBUG
603
604
605
606delist from robot captcha challenge:
607go admins@elk.sgvps.net 'sudo
608/usr/local/consul/lib/watches/event/elastic.pm bfwhite --action put
609--host myhpl.net --ip 24.187.241.226 --comment "TID2257923â€'
610
611
612Unable to add Add-on, and DNS zone is empty:
613/scripts/restartsrv_dnsadmin
614
615Custom NGINx changes:
616/etc/nginx/custom/pre_vhost
617/etc/nginx/custom/post_vhost
618
619
620x3 emails and Advanced DNS editor empty:
621Synced the /usr/local/cpanel/base/cjt/ from a previously working cPanel
622version ( 11.62 which we have on our end) and all issues were resolved.
623
624As far as I could see someone has trie to make some changes, not sure to which extent though:
625
626drwxr-xr-x 7 root root 20480 Jun 8 08:31 cjt/
627
628drwxr-xr-x 7 root root 20480 Mar 28 03:02 cjt_BACKUP/
629
630drwxr-xr-x 7 root root 28672 Jun 8 03:12 cjt.old/
631
632
633
634TRUNCATE ALL TABLES IN A DB FROM SHELL:
635NO ROOT:
636mysql -Nse 'show tables' edilizi6_ferramenta -uedilizi6_ferram -p'^N&[^KxZD3rl' | while read table; do mysql -e "truncate table $table" edilizi6_ferramenta -uedilizi6_ferram -p'^N&[^KxZD3rl'; done
637ROOT:
638mysql -Nse 'show tables' poggi1_wp339 | while read table; do mysql -e "truncate table $table" poggi1_wp339; done
639
640
641Emails/DNS zone/Crons not displayed:
642copy /usr/local/cpanel/base/cjt from another working server, with similar cPanel version.
643
644
645Add .html to all files when visited to browser, but secretly:
646RewriteCond %{REQUEST_URI} !^.*\.html$
647RewriteCond %{REQUEST_FILENAME} !-f
648RewriteCond %{REQUEST_FILENAME} !-d
649RewriteRule ^(.*)$ %{REQUEST_FILENAME}.html
650
651
652
653Disable bot captcha:
654root@c11278 [/etc/nginx/protect]# tail /etc/nginx/protect/captcha.zzz.disable.conf
655
656}
657
658
659
660# Disable captcha protection for certain IPs/IP ranges
661
662geo $captcha_whitelist_addr {
663
664 # Whitelist IPs/Ranges
665
666# 1.2.3.4 1;
667
668# 7.8.9.0/24 1;
669
670# 2a02:fe80::/29 1;
671
672 81.169.145.161 1;
673
674}
675
676
677
678Python scripts 500 error - Check with cat -A for any non-printable symbols.
679
680
681
682
683/usr/local/cpanel/base/frontend/x3/branding/index.html
684
685from another server. This happens if a cPanel upgrade is performed, without our fixers (for example the client runs it, or it is on a cron job). You might need to switch the accounts manually to x3 as well
686
687replace paper_lantern x3 -- /var/cpanel/users/*
688
689
690POSTER IS NO STARTING:
691root@c15869 [~]# chkconfig --list postgresql
692
693postgresql 0:off 1:off 2:off 3:off 4:off 5:off 6:off
694
695root@c15869 [~]# chkconfig --list postgresql-9.6
696
697postgresql-9.6 0:off 1:off 2:on 3:on 4:on 5:on 6:off
698
699root@c15869 [~]# /etc/init.d/postgresql-9.6 stop
700
701Stopping postgresql-9.6 service: [FAILED]
702
703root@c15869 [~]# /etc/init.d/postgresql-9.6 start
704
705Starting postgresql-9.6 service: [ OK ]
706
707
708
709root@c15869 [~]# su - postgres
710
711-bash-4.1$ psql
712
713psql: FATAL: no pg_hba.conf entry for host "[local]", user "postgres", database "postgres", SSL off
714
715
716
717root@c15869 [/var/lib/pgsql/data]# cat pg_hba.conf
718
719host samerole all 127.0.0.200 255.255.255.255 pam pamservice=postgresql_cpses
720
721
722
723root@c15869 [/var/lib/pgsql/data]# vim pg_hba.conf
724
725root@c15869 [/var/lib/pgsql/data]# wc -l pg_hba.conf
726
72738 pg_hba.conf
728
729root@c15869 [/var/lib/pgsql/data]# chattr +ia pg_hba.conf
730
731
732
733root@c15869 [/var/lib/pgsql/data]# /etc/init.d/postgresql-9.6 restart
734
735Stopping postgresql-9.6 service: [ OK ]
736
737Starting postgresql-9.6 service: [ OK ]
738
739
740
741Remove all posts with empty title from wordpress:
742
743delete a,b,c,d
744
745FROM wp0b_posts a
746
747LEFT JOIN wp0b_term_relationships b ON ( a.ID = b.object_id )
748
749LEFT JOIN wp0b_postmeta c ON ( a.ID = c.post_id )
750
751LEFT JOIN wp0b_term_taxonomy d ON ( d.term_taxonomy_id = b.term_taxonomy_id )
752
753LEFT JOIN wp0b_terms e ON ( e.term_id = d.term_id )
754
755WHERE a.post_title = ""
756
757
758
759
760Create a New Account
761
762Account Creation Status: ok (Account Creation Ok)
763
764
765
766Done.
767
768
769
770root@c15869 [~]# cat /etc/motd
771
772 -==============================-
773
774 -= Managed Servers by SiteGround =-
775
776 -==============================-
777
778
779
780Welcome to c15869.sgvps.net
781
782
783
784
785
786Apparently someone upgraded PGsql to 9.6 here:
787
788https://support.siteground.com/tickets/2327238
789
790User 'postgres' was left with wrong pass and pg_hba.conf was missing entries.
791
792Fixed here:
793
794https://support.siteground.com/tickets/2346118
795
796
797
798Reinstalling softaculous;
799Had to reinstall softaculous as nothing else was helping. Followed this procedure:
800
801
802
803https://www.softaculous.com/docs/Reinstall
804
805
806
807Except I did not restore iscripts.php as it was causing the blank page. Seems to work fine no - please double-check on your end.
808
809
810
811Joomla with gZip encoding error:
812zlib.output_compression should be enabled in php.ini
813
814PHP 7 shenanigans:
815opcache.interned_strings_buffer = 16
816output_buffering = On
817opcache.memory_consumption = 256
818
819
820
821
822wget georgikojuharov.com/scripts/performance.sh
823sh performance.sh
824
825
826NGINX TMEOUTS:
827The issue is that proxy_read_timeout does not take effect unless
828placed in the vhost itself as this is the last place it is set - same as
829 local php.ini for example.
830
831
832
833I have created a custom vhost for creixemdir.net:
834
835
836
837/etc/nginx/vhosts/creixemdir.net.tmpl
838
839
840
841And set proxy_read_timeout to 3000 there. Previously I had set it to 1500, and the script ran for 25 minutes:
842
843
844
845
846Code:
847
848kalinstanchev@Kalin-Stanchev:~$
849 time curl -sI
850"http://creixemdir.net/~creixemdir/apipro/v1/cerca/json?prof=arquitectes&prov=barcelona&numpag=20"
851
852HTTP/1.1 504 Gateway Time-out
853
854Server: nginx
855
856Date: Fri, 17 Nov 2017 21:45:12 GMT
857
858Content-Type: text/html
859
860Content-Length: 176
861
862Connection: keep-alive
863
864
865
866
867
868real 25m0.195s
869
870user 0m0.027s
871
872sys 0m0.063s
873
874
875
876
877It again resulted in timeout though so I altered it to 3000 now. In any
878case, I am not sure what the purpose of this script is and how 25
879minutes are not enough for it - so I am not even certain if 60 minutes
880will be enough - it looks like there is an issue with the script
881execution itself.
882
883
884
885Awk add up first row of file - cat strace.txt | awk '{count=count+$1}END{print count}’
886
887
888
889
890
891Disable TLS 1.0:
892root@c19391.sgvps.net [~]# grep ssl_protocols /etc/nginx/ssl/ssl.conf
893
894ssl_protocols TLSv1.1 TLSv1.2;
895
896
897
898root@c19391.sgvps.net [~]# /usr/local/supercache/bin/generate_ngx_vhosts.sh
899
900/etc/perp/nginx_reloader: ok
901
902root@c19391.sgvps.net [~]# /etc/init.d/nginx reload
903
904Reloading nginx: [ OK ]
905
906root@c19391.sgvps.net [~]#
907
908Redirect cPanel/Webmail/WHM urls:
909/usr/local/apache/conf/includes/pre_main_2.conf
910Redirect permanent /cpanel https://rankonehost.org:2083
911Redirect permanent /whm https://rankonehost.org:2087
912Redirect permanent /webmail https://rankonehost.org:2096
913
914All requests to site come from server IP:
915edit /usr/local/apache/conf/includes/pre_virtualhost_2.conf -> RPAFproxy_ips (add server IP in that line)
916
917
918MOD_SEC LARGE FILES:
919limits increased to 3GB in the following includes:
920
921/usr/local/apache/conf/userdata/ssl/2_4/nigelb21/sourceonice.com.au/modsec.conf
922
923/usr/local/apache/conf/userdata/std/2_4/nigelb21/sourceonice.com.au/modsec.conf
924
925Mysql Unknown or incorrect time zone: -
926mysql_tzinfo_to_sql /usr/share/zoneinfo/|mysql
927
928
929
930
931SWAP USAGE:
932for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done | sort -k 2 -n -r | less
933cPanel -> phpMyAdmin stuck - /scripts/restartsrv_cpanel_php_fpm
934yum --disableexcludes=main install 1h-baseos-letsencrypt.x86_64
935SSH key gen fails on cloud:
936chmod 666 /dev/pts/ptmx