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 ... 4 5 [6] 7 8 ... 28
76
I am using Apache-Nginx as the webserver. I want to allow all the HTTP methods (PUT, DELETE) on a host by changing the vHost file. When I change that via the "WebServers Configuration Editor" to add a line, it reverts to the template file after a while.

I tried adding a configuration via the "Manage WebServers Configuration" page, but the "All_methods" tpl file does not work. I can't successfully restart the httpd service, it complains about the conf file. I tried cloning the default tpl file to create my own template, but I can't make it work with my web current web serv Apache_nginx.

As the last option, I tried to edit the default.tpl and default.stpl file, it worked but I am just surprised that its back to the orig file now!

You must avoid to change directly the vhosts/*.conf files.
They will always be overwritten when the webservers are rebuilt.

Instead of to change directly the vhosts conf files, you must create additional custom templates, simply copying and change them.
After that, you must apply the customized template to you site in CWP, "WebServers Domain Conf".

If you customize your webserver configuration, you *must* customize too the webserver templates in "/usr/local/cwpsrv/htdocs/resources/conf/web_servers/", otherwise, they will always be overwritten when CWP is updated.
(check there your webservers files used)

The templates per-si are *always* overwritten when CWP is updated too. So, you *must* to create additional files in that directories, instead to change it.
Copy an existant file, change the name of the file, one for .conf and another for .ssl.conf (always two files, obligatorily). This is needed to the template is showed in the "WebServers Domain Conf".

You can check this link to do it:
http://wiki.centos-webpanel.com/webservers-vhost-templates

One diverse way to avoid this customization above (in webserver templates) is to create your new custom files directly in 'conf.d' diretories of your webservers, avoiding to change the system config webserver files. You can use it, if possible.

Regards,
Netino

77
E-Mail / Re: Fake users sending spam
« on: January 11, 2022, 11:47:30 PM »
(...)
Jan 11 08:44:43 cwp postfix/smtpd[17250]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=0/1 commands=2/3
Jan 11 08:44:43 cwp cbpolicyd[10726]: module=Quotas, action=defer, host=127.0.0.1, helo=myserver.tdl, from=collatedbg@myserver.tdl, to=b.lichtenberg@random.de, reason=quota_match, policy=6, quota=
3, limit=4, track=Sender:@myserver.tdl, counter=MessageCount, quota=11.58/10 (115.8%)
Jan 11 08:44:43 cwp postfix/smtpd[17251]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 450 4.7.1 <b.lichtenberg@random.de>: Recipient address rejected: 1; from=<collatedbg@myserver.tdl> to=<b.lichtenberg@random.de> proto=ESMTP helo=<myserver.tdl>
Jan 11 08:44:43 cwp postfix/smtpd[17251]: lost connection after RCPT from localhost[127.0.0.1]
Jan 11 08:44:43 cwp postfix/smtpd[17251]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=0/1 commands=2/3
Jan 11 08:44:43 cwp cbpolicyd[17260]: module=Quotas, action=defer, host=127.0.0.1, helo=myserver.tdl, from=f_ycqxcyirp@myserver.tdl, to=frank-rilling@random.de, reason=quota_match, policy=6, quota=3, limit=4, track=Sender:@myserver.tdl, counter=MessageCount, quota=11.58/10 (115.8%)
Jan 11 08:44:43 cwp postfix/smtpd[17258]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 450 4.7.1 <frank-rilling@random.de>: Recipient address rejected: 1; from=<f_ycqxcyirp@myserver.tdl> to=<frank-rilling@random.de> proto=ESMTP helo=<myserver.tdl>
Jan 11 08:44:43 cwp postfix/smtpd[17258]: lost connection after RCPT from localhost[127.0.0.1]
Jan 11 08:44:43 cwp postfix/smtpd[17258]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=0/1 commands=2/3
Jan 11 08:45:17 cwp postfix/smtpd[17254]: warning: hostname examsection.earacheevince.com does not resolve to address 212.192.246.26
Jan 11 08:45:17 cwp postfix/smtpd[17254]: connect from unknown[212.192.246.26]
Jan 11 08:45:20 cwp postfix/smtpd[17254]: warning: unknown[212.192.246.26]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Jan 11 08:45:20 cwp postfix/smtpd[17254]: lost connection after AUTH from unknown[212.192.246.26]
Jan 11 08:45:20 cwp postfix/smtpd[17254]: disconnect from unknown[212.192.246.26] ehlo=1 auth=0/1 commands=1/2
(...)

The spam is coming from localhost. It doesn't appear to be an open relay. It looks like some script on the server itself is allowing this sending attempt. The web logs for the same time and/or spam start time should be investigated to try to identify which scripts are allowing this.
The following files/directories must be scanned:
/usr/local/apache/logs/
/usr/local/apache/domlogs/
/usr/local/cwpsrv/var/services/roundcube/logs/

78
E-Mail / Re: how to know the spam source
« on: January 09, 2022, 03:33:00 AM »
Hello,

 Is there any way to know which site sending spam email in the server, i have scanned the server many times, how to know the source of the spam ?

How did you conclude that there is mail spam on your server?
What log files?

79
(...)
Hello Netino,

Sorry the delay. I'm not the one who add domains to CWP, and I don't know exactly whats the procedure that my partners follow. I tried yesterday to edit a domain using the "select template" method, and it seems that the nightly rebuild keep the changes and the site is still working.

To summarize (please, correct me if I misunderstand): I have to create a template for every site that has a configuration detail. For example, if I don't want to have webmail support for a site, I have to create a template for that. If a site should not have "AllowOverride All", it is necessary to create a template for that. And so on. Like seati pointed before, it is necessary to have a template for every difference that a site has with another site in the same server. Right?
(...)

Yes, you are right.
Any new customization needs a new template.
But the same single template can be applied to a group of sites.

80
(...)
Did you read all previous posts? A template shouldn't be something that needs to be created for each website, the definition of "template" in computing is:
a preset format for a document or file, used so that the format does not have to be recreated each time it is used.
So if we need to create a "template" for each website, then it's not a template, but a custom config.

But you don't have to create a new template for each site!
You can create just one template for all other sites.
So you set and use the same template for that customized sites.
You only need to create a new template just when you have a new type of customization. For a new site, or new group of sites.

Quote
(...)
Again, my hack works... but I have mixed feelings about having to do some custom coding to go around a bug that wasn't there... if CWP had rebuilt vhosts from the beginning, then it would be my choice to do some custom coding, go the "cwp way" or install another panel. But the fact that this "feature" (a.k.a. "bug") appeared out of nowhere with the last update and without any previous notice is what troubles me.

I don't know what bug are you mentioning, but the templates are a feature for the panel.

81
E-Mail / Re: Need help. all mail deferred
« on: January 06, 2022, 09:45:26 PM »
(...)
The test server that I have, which has no custom configuration of the email system, has also the same bugs with the vmail folder ownership.

Here's my auth
Code: [Select]
service auth {
unix_listener auth-userdb {
mode = 0660
user = vmail
group = mail
}

It's not certain that the auth module has anything to do with the UserCP Email module not being able to create a mailbox inside the vmail folder when it has vmail:mail ownership.

I completely disagree: Depends on the user you are running dovecot.
In my case, dovecot is running as user 'vmail'.
If yours is default installation, yours should be running in "vmail:mail" ownership.
So all users can be created in folders with "vmail:mail" ownership.

I think too your configuration should be identical to that of Namaste, like follows:
Code: [Select]
service auth {
unix_listener auth-userdb {
mode = 0660
user = vmail
group = mail
}

# Postfix smtp-auth
unix_listener /var/spool/postfix/private/auth {
mode = 0660
user = postfix
group = postfix
}
}

Quote
Either the Email module is configured to work with user:mail, or it is misconfigured and it is supposed to work with vmail:mail. Either way, the Email module code is encrypted with IonCube, like every other module..., and I can't inspect the code myself...
As said, is not needed to change ownership of your files if you are running dovecot as 'vmail' user.
Check what user you are running dovecot in your server.
This can be the source of the problem.

Quote
Edit: or it could be that users are not added to the mail group? This too is the same behavior on the test server

No. In my case, mail group is:
Code: [Select]
mail:x:12:postfix,vacation,opendkim,dovecotIt's the default since from CWP installation.

82
E-Mail / Re: Need help. all mail deferred
« on: January 06, 2022, 09:27:32 PM »
(...)
Code: [Select]
service auth {
unix_listener auth-userdb {
mode = 0660
user = vmail
group = mail
}

# Postfix smtp-auth
unix_listener /var/spool/postfix/private/auth {
mode = 0660
user = postfix
group = postfix
}
}

The user:group of your configuration is correct.
Try to change it to "mode = 0666" just to test, and check if works.

83
(..)
Code: [Select]
cp -rp /usr/local/cwp/.conf/phpdefender/snuffleupagus-master /usr/local/cwp/.conf/phpdefender/snuffleupagus-master_BACKUP
cd /usr/local/cwp/.conf/phpdefender/snuffleupagus-master/src
/opt/alt/php-fpm74/usr/bin/phpize
chmod +x configure
./configure --with-php-config=/opt/alt/php-fpm74/usr/bin/php-config
make && make install
vi /opt/alt/php-fpm74/usr/php/php.d/snuffleupagus.ini
add the code mentioned above, restart php-fpm and check the security center to see if it appears there. Or at least in the module list.
If you get permission error with the phpize file, then it probably means that your php-fpm is disabled. This was the case with my test server because it doesnt have the pro version. I just had to "chmod +x" it to continue.

I have used the above commands to install suhosin on php-fpm56 as there wasnt an option to add it through CWP panel. I have just now tested to manually install snuffleupagus on a PHP-FPM version that is still installed on the test server (but disabled) and now it appears on the security center.

These steps are almost correct, I think, except one, that is used by CWP team to compile it:
Instead:
Code: [Select]
./configure --with-php-config=/opt/alt/php-fpm74/usr/bin/php-config

...use:
Code: [Select]
./configure --with-php-config=/opt/alt/php-fpm74/usr/bin/php-config --enable-snuffleupagus

They have an additional problem, at least in my installation: The logs cannot be viewed in CWP panel anymore, and CWP cannot anymore change any configuration in snuffleupagus, nor compile again snuffleupagus.
But I just didn't try to reinstall PHP-FPM to check if solves.

84
I am experiencing this issue, too. I have a WSGI application that requires a custom vhost file to deploy and this is breaking my website every single night. If there isn't a solution soon I'll have to stop using CWP.

Yes, there is a solution: is you to create a new template file, and set the domain to use it in "WebServers Settings", "WebServers Domain conf".
You did it.?
Did you read this message?: http://forum.centos-webpanel.com/index.php?topic=11650.msg39943#msg39943

85
Updates / Re: After update today, nginx/1.20.0 error
« on: January 06, 2022, 09:02:22 PM »
After recent update, all nginx/php-fpm configuration files regenerates everyday since a week now. So I made templates so after everyday regeneration doesn't break websites. But this is big problem. I tried all the commands but still every morning when I check configuration files, they are showing modified.

This needs to be fixed urgently guys.

Did you change the template files.?

86
PHP / Re: PHP-FPM User Conf File Delete Problem
« on: January 06, 2022, 12:51:23 AM »
/opt/alt/php-fpm74/usr/etc/php-fpm.d/users/user.conf

Default path...

Now, another site's .conf file has been deleted. PHP-FPM throws an error because it cannot communicate with the web service.
(...)

What file was deleted.?
Did you create any customization directly in some apache server configuration file.?
If so, what files.?

87
Hello everyone,

I'm following all the threads reporting this issue (vhosts overwritten with default values, page suspended) since Dec 30. For my server, the overwritting happens at 3:00 am, so fifteen minutes later, a cron job restore vhosts/ from backup and reload apache to recover the websites.
However, I was specting a better/more formal solution, maybe a patch, coming from the CWP team. All the solutions proposed in the forum are hacks, not real solutions. If I'm missing something, the proper solution, can anyone please point me what's the correct fix for this problem?

Thanks in advance :-)

The CWP dashboard now rebuilds all sites daily.
This means that if you have any previous customizations, you cannot do them directly in the Apache server configuration files.
You must create the customizations only in cloned template files for this purpose.
You did it?
What types of customization have you done?

88
(...)
That might of helped you but it's not helping the majority of people that this is happening to daily. Some of us have tried soooo many things people are posting how to fix it but then the next day, it happens again.

Someones post about update time at least helped me this morning so it happens while I am in front of the computer. I expect to happen again in about 20 minutes.

Your domains are resolving normally.?
Are delegated to CloudFlare.?

89
E-Mail / Re: Need help. all mail deferred
« on: January 06, 2022, 12:24:56 AM »
(...)
http://forum.centos-webpanel.com/index.php?topic=11668.msg39929#msg39929
Bug #203 and #204

I think I should keep my position: the user:group must be "vmail:mail".
This is the original configuration of CWP.
By the way, you can have a custom configuration.

What you have in "service auth {" group section in /etc/dovecot.dovecot.conf file?

90
(...)
A template is supposed to be something that you can use several times and that just gets the "custom" info replaced... or at least, that's what I understand for "template". When you have to create a "template" for each and every single site that uses a custom rewrite, redirect, directive, etc. then it's a custom config, not a template.

The RIGHT way for it to work (hope CWP staff reads this) is to:

1. Have a templates section as it is right now.
2. Have a CUSTOM CONFIG section for each website.
3. Have the vhosts "builder" load the template, replace the "regular" info, check if there's  a custom config for this website and if there is, then include such config in the vhost config file.

I have customizations in '/usr/local/apache/conf.d', for example, and all of them was preserved with the rebuild of the webservers, without any templates.
But you can do it too in nginx, if needed.
It depends of your preferences.

Pages: 1 ... 4 5 [6] 7 8 ... 28