Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Netino

Pages: [1] 2 3 ... 28
1
PHP / Re: AH01075: Error dispatching request to : (polling)
« on: May 24, 2025, 12:22:59 AM »
The problem isnt with phpfpm restarting @netino. It is something else.
cron logs:
(...)
Uptimerobot says site was down at  01:12:34 but it has a 5 minute interval.
So it can be down from 01:07.

Yeah, it doesn't seem to be something triggered by cron. I see you have CXS, but I don't know what the /etc/cxs/cxsdbupdate.pl script does, it would be good to check.

Quote
In accesslog the last line with http 200 code is this:
[23/May/2025:01:08:23 +0200] "POST /wp-admin/admin-ajax.php HTTP/2.0" 200

The first with a 504 error is this
Could it be a crawler taking down the site?

Is it your web server that goes down? If that's the case, you need to check the log in the file '/usr/local/apache/logs/error_log' around that time.
The AH01075 error doesn't seem to be related to this web server crash, because it's a very common error, and I have dozens of them on my server, and it has never crashed because of this error in 8 years.

Quote
[23/May/2025:01:07:58 +0200] "GET /robots.txt HTTP/1.1" 504 247 "-" "Mozilla/5.0 (compatible; SemrushBot-BA; +http://www.semrush.com/bot.html)"

Yes, this is a bot, but I don't think it can take down a server unless your server is already overloaded. It will make a lot of connections, and if the server is already overloaded, it could crash.

Most likely, your web server has already experienced problems, and simply can't serve the page.

According to the website <https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/504>:
"The HTTP 504 Gateway Timeout server error response status code indicates that the server, while acting as a gateway or proxy, did not receive a response in time from the upstream server in order to complete the request. This is similar to a 502 Bad Gateway, except that in a 504 status, the proxy or gateway did not receive any HTTP response from the origin within a certain time.

There are many causes of 504 errors, and fixing such problems likely requires investigation and debugging by server administrators, or the site may work again at a later time. Exceptions are client networking errors, particularly if the service works for other visitors, and if clients use VPNs or other custom networking setups. In such cases, clients should check network settings, firewall setup, proxy settings, DNS configuration, etc."

But there are other possibilities:
web server built and compiled with error;
customization on your web server;
Server configured with low resources;
Kernel customized/compiled with error;
etc.

Ideally, you should also check your log /var/log/messages around that time.

2
PHP / Re: AH01075: Error dispatching request to : (polling)
« on: May 23, 2025, 12:49:24 AM »
[Wed May 21 00:34:42.824943 2025] [proxy_fcgi:error] [pid 296120:tid 296160] (70007)The timeout specified has expired: [client xxx:43672] AH01075: Error dispatching request to : (polling)

Connection refused: AH02454: FCGI: attempt to connect to Unix domain socket /opt/alt/php-fpm82/usr/var/sockets/domain.sock (localhost:8000) failed

AH01079: failed to make connection to backend: localhost

I Get this error EVERY night at around 00-02 the only way to get the page up again is by restarting the php-fpm service.

All other sites on the server are online only 1 page goes down. i cant figure out what causes this. Any ideas?

A simple restart on your php-fpm server, while serving pages, can cause these messages.

A restart on your php-fpm server can occur if you run a cron process restarting the server at that time, or, for example, if you set a rebuild in the CWP configuration that did not complete.

Check the cron logs (/var/log/cron) at that time to see if there is a process restarting your php-fpm around that time.

Regards,

Netino

3
SSL / Re: Probelm with renewing SSL certs
« on: May 23, 2025, 12:35:48 AM »
Hi friend, I get the next when run the script

ot@mail ~]# ./script.sh xxx.com
[Tue May 20 09:48:46 -05 2025] Unknown parameter: mail

This is not a message from acme.sh.
So, may be you copy something wrong in your script.?

Try to replace the parameters directly in the main command in that script (/root/.acme.sh/acme.sh ... )

Type all these commands, step-by-step, in bash from your server:
Code: [Select]
# DOM=xxx.com
# WEBS=""
# systemctl -q is-active nginx && WEBS="${WEBS} nginx"
# systemctl -q is-active httpd && WEBS="${WEBS} httpd"
# /root/.acme.sh/acme.sh --cert-home /root/.acme.sh/cwp_certs --webroot /usr/local/apache/autossl_tmp --issue -d ${DOM} mail webmail ftp cpanel --ecc \
  --cert-file /etc/pki/tls/certs/${DOM}.cert \
  --key-file  /etc/pki/tls/private/${DOM}.key \
  --fullchain-file /etc/pki/tls/certs/${DOM}.bundle \
  --reloadcmd "systemctl restart ${WEBS}"

Alternatively, you can put your parameters between quotation marks, like:
Code: [Select]
# DOM="xxx.com"
(...)
# /root/.acme.sh/acme.sh --cert-home "/root/.acme.sh/cwp_certs" --webroot "/usr/local/apache/autossl_tmp" --issue -d "${DOM}" "mail" "webmail" "ftp" "cpanel" --ecc \
(...)

You can check where are the error, and post here.

4
SSL / Re: Probelm with renewing SSL certs
« on: May 20, 2025, 02:37:33 AM »
Try to repair and create a new configuration with run the following script(still working with acme.sh):
Code: [Select]
#!/bin/bash

DOM=${1}
WEBS=""
systemctl -q is-active nginx && WEBS="${WEBS} nginx"
systemctl -q is-active httpd && WEBS="${WEBS} httpd"

/root/.acme.sh/acme.sh --cert-home /root/.acme.sh/cwp_certs --webroot /usr/local/apache/autossl_tmp --issue -d ${DOM} mail webmail ftp cpanel --ecc \
  --cert-file /etc/pki/tls/certs/${DOM}.cert \
  --key-file  /etc/pki/tls/private/${DOM}.key \
  --fullchain-file /etc/pki/tls/certs/${DOM}.bundle \
  --reloadcmd "systemctl restart ${WEBS}"

Run it with:
Code: [Select]
# chmod script.sh
# ./script.sh your-domain.com

After that, try to renew with CWP (because CWP still could claim the domain have not a cert)

5
The user/group ownerships in /var/lib/spamassassin should be the same configured in your master.cf file.
What procedure you did use to install and configure it?

Check if you already created a user for spamassassin.
If you don't have already made, create the user for spamassassin(any name you choose, here is 'spamfilter'):
Code: [Select]
groupadd -g 1001 spamfilter
useradd -u 1001 -g spamfilter -s /sbin/nologin -d /var/lib/spamassassin spamfilter
chown -R spamfilter:spamfilter /var/lib/spamassassin

And try to replace that line in your master.cf file, with this:
Code: [Select]
spamassassin unix -     n       n       -       -       pipe user=spamfilter argv=/usr/bin/spamc -f -e  /usr/sbin/sendmail -oi -f ${sender} ${recipient}

6
Run these commands:

Code: [Select]
# ls -alF /var/lib/spamassassin
Code: [Select]
# grep spamassassin /etc/postfix/master.cf | grep pipe | sed -r 's/^spamassassin.*pipe user=(\S+).*/\1/'
and post here.

Regards,
Netino

7
SSL / Re: Probelm with renewing SSL certs
« on: May 14, 2025, 02:20:06 AM »
Ah but the website is in other server that I dont adimistrate. How can I to change the comprobation mode?

You simply can't get certificates via LetsEncrypt in apache mode if you can't save tokens in a specific are of the web server.
But with another app (certbot) in DNS mode, you could.
You manage the DNS server of these sites?


8
The process of forcing the creation of stronger passwords can be seen here:
https://docs.redhat.com/en-us/documentation/red_hat_enterprise_linux/7/html-single/security_guide/index#sec-Forcing_Strong_Passwords

However, this reinforcement is done at the operating system level through the Linux kernel PAM module.

At the CWP application level, this choice is not offered to the user when creating/changing the password, and I have never tested whether, if the password is not accepted by the operating system, CWP will recognize it and request the password again. You will only find out by running a test.

Regards,
Netino

9
SSL / Re: Probelm with renewing SSL certs
« on: May 09, 2025, 01:38:16 AM »
Possibly a bug from CWP.
This happened to me migrating domains from another server.
Once the domain was renewed manually, now the renewing process is automatic again.

Try to create a script, named like 'renew-cert.sh', to renew manually:
Code: [Select]
#!/bin/bash

DOM=${1}
/root/.acme.sh/acme.sh --home /root/.acme.sh/cwp_certs --renew --ecc -d ${DOM} --force

Change permissions:
Code: [Select]
# chmod 700 renew-cert.sh
And run the script (replacing "domain.com" with your domain):
Code: [Select]
# ./renew-cert.sh domain.com
Regards,
Netino

10
Information / Re: check all autoSSL (Lets encrypt) that failed
« on: May 03, 2025, 01:31:27 AM »
Thanks! No way for an integrated feature in the panel? To alert us, etc?

While this feature is not implemented in CWP, you can use this command in cron, to be alerted:

Code: [Select]
# find /etc/pki/tls/certs -type f -name \*.cert -mtime +60 | sed -e 's#^/etc/pki/tls/certs/##g' -e 's#\.cert$##' | xargs -I '{}' bash -c 'echo -e "Domain Cert {} expired.\n.\n" | mail -s "ALERT: Domain Cert {} expired" your-mail@yourdomain.com'
Regards,
Netino

11
CentOS 8 Problems / Re: ImageMagick installation on Almalinux 8
« on: April 29, 2025, 03:12:16 AM »
Hi,

php -v giving error of unable to load dynamic library 'imagick.so'
(...)
but found that following line not working:
ln -s /usr/local/include/ImageMagick-6 /usr/local/include/ImageMagick

On checking, I didnot found any folder /usr/local/include/ImageMagick-6  in my Almalinux ver 8
(...)

I think the right command is:
Code: [Select]
ln -s /usr/include/ImageMagick-6 /usr/local/include/ImageMagick-6
The include library exists in '/usr/include/ImageMagick-6' in AL8.

Regards,
Netino

12
E-Mail / Re: Stop forwarding SPAM emails
« on: April 24, 2025, 02:40:02 AM »
(Adapted from: <https://docs.directadmin.com/other-hosting-services/preventing-spam/outgoing-spam.html#why-forwarders-to-external-mailservers-can-be-dangerous-for-your-server>)

Why forwarders to external mailservers can be dangerous for your server

It's not uncommon for clients to want to forward mail from their own domain to an external email address, say Gmail, for example.

The path of an email sent to the user@domain.com forwarder would be:

Sender -> CWP box: user@domain.com -> External: user@gmail.com
This will work fine, until spam comes into the picture.

The issue with spam is that, if the proper blocks are not in place, your CWP box will happily relay spam to Gmail, which could then cause Gmail to think that the spam is originating from your CWP box, thus getting your IP blacklisted even though the spam came from somewhere else.

Another issue is that, if Gmail then determines that the message is spam, it may be denied at the Gmail server, thus returning it back to your CWP box to figure out what to do with. Since the sender is not from the CWP box, and the final recipient is Gmail (which was denied), Postfix tries to send it back to the original "sender", which with spam, is almost always fake/spoofed (these headers can be spoofed).

This causes "backscatter", where Postfix is trying to return a message to an address that was not the actual sender. This backscatter is also a potential hazard to getting your IP blacklisted.

Solutions:

- Avoid forwarders to external domains whenever possible (it is usually hard to convince users of this).

- For Gmail, as an example, have Gmail pull your POP emails to Gmail, rather than you pushing them via forwarders. See this guide for more info.

- Ensure SpamAssassin is enabled, and set it to drop spam or send to spambox (do not use "deliver to inbox"). At a minimum, use "drop high scoring spam".

- Block bounces from leaving.

- RBL Blocking is a robust way of blocking spam before Postfix even sees the message (realtime IP based block). Some consider RBL blocking to sometimes be too strict in that it may often block entire ISP ranges (send on port 587 with smtp-auth, instead of port 25).

Regards,
Netino

13
Updates / Re: New problems with updates
« on: April 24, 2025, 02:22:09 AM »
To be blunt and honest, there is no reasonable reason to keep a system like Centos7, whose support has been out of date for almost a year, and therefore subject to security holes. Upgrade as soon as you can, if you don't want to make yourself and your client victims of cyber attacks. Right now Centos7 may already be subject to flaws that you don't know about, for the simple reason that they haven't been disclosed for almost a year, and they won't be disclosed anymore.

Regards,
Netino

14
Hey,

I've opened a ticket on this already and will update this thread with more information. I logged into CWP web panel and was greeted by this:

(...)


(...)
Everything else is working perfectly fine, I haven't changed my default SSH ports but I don't think that'd be causing it.

I ordered CWPpro and used the "sh /scripts/update_cwp" command to force and update to enable CWPpro, but after a recent restart due to Vultr's London datacenter maintenance, this warning starting showing up. My IP address is the exact same.


Check if you have some firewall block to 'centos-webpanel.com' or to IP adress [158.69.227.165].
These are used to update the system.

Regards,
Netino

15
Other / Re: Varnish 7 Installation & Configuration
« on: April 10, 2025, 01:18:09 AM »
Has anyone successfully installed Varnish 7 on CWP yet?

I've tried a couple of times now but still get 503 when testing. Has anyone figured out the correct changes for the varnish.service file?

Yes.
You already install it?

After install, you need to change the line in file '/usr/lib/systemd/system/varnish.service' of default installation, from:
Code: [Select]
ExecStart=/usr/sbin/varnishd -a :6081 -f /etc/varnish/default.vcl -s malloc,256m
to:
Code: [Select]
ExecStart=/usr/sbin/varnishd -a :82 -f /etc/varnish/default.vcl -s malloc,256m
After that, run:
Code: [Select]
# systemctl daemon-reload

Pages: [1] 2 3 ... 28