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 - Wonder

Pages: 1 ... 3 4 [5] 6 7
61
MySQL / Re: how to replicate the database
« on: December 29, 2020, 10:57:21 AM »
Have you checked these articles?

https://tecadmin.net/how-to-set-up-mysql-master-slave-replication/
http://www.hackthesec.co.in/2016/01/mysql-replication-in-5-minutes.html
I know that, this thread is very old.

I don't know if its for cwp or because I don't know. I try some differents configs, and I can't.

I wan't replicate 2 database from one same server, the tutos of this post are very old, other more newers....I can't configure this,.

Some help about this?

Recards.

where you stuck ?

I have followed several google guides, one of the links above is from a long time ago, so I considered it better to look for more current ones.
I have seen that from phpmyadmin it could be done, but it does not work for me, then I will try again, when the user is added it gives a permissions error (all this from phpmyadmin).
I had to revert everything, luckily, I had a backup of the db before I started, but even so, it did not restore it, it said that the tables of the current database were empty.
Also luckily, I had a snapshoot of the vps, I rolled it back and then restored the database backup.
Right now I'm at 0 point, I did a lot of testing but I had to revert everything when, for some reason, the database crashed (the master).

Then I will start the process again and indicate where I stay.

Thanks and best regards.

62
MySQL / Re: how to replicate the database
« on: December 27, 2020, 06:52:05 PM »
Have you checked these articles?

https://tecadmin.net/how-to-set-up-mysql-master-slave-replication/
http://www.hackthesec.co.in/2016/01/mysql-replication-in-5-minutes.html
I know that, this thread is very old.

I don't know if its for cwp or because I don't know. I try some differents configs, and I can't.

I wan't replicate 2 database from one same server, the tutos of this post are very old, other more newers....I can't configure this,.

Some help about this?

Recards.

63
Updates / Re: Anacron / system update / notifications disabled modules.
« on: December 27, 2020, 08:20:08 AM »
> Is it possible to change this schedule? It just takes when there is more influx of people in one of the sites.

You can find and change cronjobs in files into /etc/cont.d/, /etc/cron.daily/


Unfortunately, it doesn't work either.
I have edited this file:
nano /etc/cron.daily/cwp
Change with this:
Quote
0 8 * * * /usr/local/cwp/php71/bin/php -d max_execution_time=1000000 -q /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php
0 8 * * * /usr/local/cwp/php71/bin/php -d max_execution_time=1000000 -q /usr/local/cwpsrv/htdocs/resources/admin/include/cron_backup.php
And when received the email from anacron this is the result:
[/quote]/etc/cron.daily/cwp:

/etc/cron.daily/cwp: line 1: 20: command not found
/etc/cron.daily/cwp: line 2: 20: command not found
[/quote]

Then....not work with this change, I can set some time/hour for this executions.....
(If I miss something ...)

Regards.

64
Updates / Re: Anacron / system update / notifications disabled modules.
« on: December 26, 2020, 11:01:48 AM »
At the  first time, thank you for your reply, not all persons reply with this help.

I reply per quotes:

Quote
You can find and change cronjobs in files into /etc/cont.d/, /etc/cron.daily/
I deduce the first line is cont.d but really is cron.d

I view this files and I think can solved my first an major doubt/problem, thanks!

Quote
Press the bell icon on the right top, in the CWPadmin and disable all notifications you want.
Yes, I have disabled this notifications via mail but....always, when enter to CWP Admin appears the modules and the info about this, not have enabled, and I don't want appears because I know I have this disabled. Like cwp is upgrade (or test) and restart http and or cwp every day, always, appears at next day.

This is other new question for me, its possible not restart cwp and httpd every day??

First: If some user are navigate in the web, this seconds can't.
Second: if they are an update installed, its possible we have a notice that we need to restart cwp.
-But not always is good iddea restart in one time that, we are not working in the server, for lot variables, restart som part os s.o. that have direct function in the work of site and users ... think is not good iddea.

Again, thank you very much for your attention and help.

I take this opportunity to wish you happy holidays and that next year is better than this horrible year that we are past.

65
Backup / Re: How change the time of backups?
« on: December 21, 2020, 10:25:55 AM »
"Middle" solved.

I changed the hours work in anacrontab and start, more or less, at the time that I want.

But I think that, its good iddea can change the time of this works.

66
Backup / Re: How change the time of backups?
« on: December 19, 2020, 11:07:13 AM »
Thanks for you reply!

Well, this crons, are executed at the time that (or same time in all servers)... I like preferer are executed ar other time with less work in the server.

What's my problem? That I am relatively new to CWP and I don't know how to change some aspects.

As I said in the first thread, I modified the files by adding the time to the beginning of the line, but as I imagined, it gives error (this error):
Quote
/etc/cron.daily/cwp:

/etc/cron.daily/cwp: line 1: 30: command not found
/etc/cron.daily/cwp: line 2: 30: command not found
Error because I am adding the time format to it but it is a php file and not a bash (I think so) and therefore it does not execute it.

I understand that maybe the anacron schedule should be changed, but I'm not sure ...

I just want to change the time of those checks to a better time for me, and I can't figure out how to do it ...

Thanks for your attention.

Edit: I comment the lines in  /etc/cron.daily/cwp
Quote
# /usr/local/cwp/php71/bin/php -d max_execution_time=1000000 -q /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php
# /usr/local/cwp/php71/bin/php -d max_execution_time=1000000 -q /usr/local/cwpsrv/htdocs/resources/admin/include/cron_backup.php

I execute first command in ssh:
Quote
/usr/local/cwp/php71/bin/php -d max_execution_time=1000000 -q /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php
All perfect, the respond its good:
Quote
[root@server4 ~]# /usr/local/cwp/php71/bin/php -d max_execution_time=1000000 -q /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php


====================================================
============= CentOS Web Panel Cron ================
====================================================


###########################
Firewall Flush Daily Blocks
###########################


######################
Update Server Packages
######################
Redirecting to /bin/systemctl restart cwpsrv.service
Redirecting to /bin/systemctl restart httpd.service
Redirecting to /bin/systemctl reload httpd.service
Redirecting to /bin/systemctl reload httpd.service
I add this command in cron:
Quote
   20 12 * * * /usr/local/cwp/php71/bin/php -d max_execution_time=1000000 -q /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php
I have this email with error:
Quote
====================================================
============= CentOS Web Panel Cron ================
====================================================


###########################
Firewall Flush Daily Blocks
###########################


######################
Update Server Packages
######################
Redirecting to /bin/systemctl restart cwpsrv.service
/scripts/cpanel_addhandlers: line 161: service: command not found
sh: service: command not found
sh: line 2: service: command not found

But not with the line of backup (also I added in cron) this result is good.

I don't understand what, if I execute first line in ssh, work good, if its executed in cron, I have this mail with error...

67
Backup / How change the time of backups?
« on: December 16, 2020, 11:29:47 PM »
Hello.

I search info about this, the backups (old module, not new beta backup) its executed at the same time.

I view this:
https://forum.centos-webpanel.com/index.php?topic=6840.0
Quote
crons jobs for backup are here :
/etc/cron.daily/cwp

you can modify according to your needs.
...
example:
0 3 * * * /usr/local/cwp/php71/bin/php -d max_execution_time=1000000 -q /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php
0 3 * * * /usr/local/cwp/php71/bin/php -d max_execution_time=1000000 -q /usr/local/cwpsrv/htdocs/resources/admin/include/cron_backup.php
If I edit the file /etc/cron.daily/cwp and add at the start line like above, not execute at the time and received, in the anacron info, a error in the lines of this file.

Any suggestion?

Thanks and regards!

68
Updates / Anacron / system update / notifications disabled modules.
« on: December 16, 2020, 11:26:40 PM »
Hello,
I asked the question in another subforum and I think that it was the wrong subforum and my question was wrongly formulated.

Anacron is executed every day at the same time, when it is executed, we receive a notification email, and here I have a couple of doubts:

Is it possible to change this schedule? It just takes when there is more influx of people in one of the sites.

The other, and more important for me, performs a check / notification of updates and not enabled modules (in my case, mod_security for example), every day I have to close those windows in the CWP GUI, it is possible to avoid this check of modules not activated or not appearing every day? I am aware that they are not enabled and for now, I want to leave it that way.

Thanks in advance and best regards!

69
Hi,

For start, sorrys, I don't know how indicate this :)

In one of my server I have configured mail notification in Email Alerts (module=notifications).

Well I view that, this send the email at the same time in all servers that I have configured this, more or less about 03:41 AM (this notification indicate warnings of Security Issue like I have disabled ModSecurity or Hidden Processess).

-Its possible disabled this notifications of Hidden Processes, monit monitoring...? But not in mail ( I can disabled this mails ) but in the cwp, because, all days, appears again the box with this notification and I need close this all days...

I view that, Anacron job, also send mail at the same time, I deduce, correct me if I'm wrong, that just at that moment, CWP performs a check and restarts httpd, I view in the mail that, restart and reload httpd service.

Its possible disabled the restart httpd servide? Or if not, change this time for this operation. At this time, I have some persons in site, the restart is quickly but I preferer set other time for this action.

Sorry, I know are 2 doubts in this post, but I post in same post because have relation.

70
Yes, all its ok, the person who think in ipv6...its for kill...hehehe.

Quote
In the ifcfg-eth0 file I had to add:
IPV6ADDR_SECONDARIES="2605:a140:2045:8941::2 2605:a140:2045:8941::3 2605:a140:2045:8941::4 2605:a140:2045:8941:0:30:40b7:f60d"
(Just to start)
This is just that you was need for work with ipv6, config in ifcfg-eth0, only in this.
In the vhost files, with /64 I think its sufficient for work.

I'm very glad it works for you, and if I could be of help, all the better.

For some reason, if the address isn't listed there, the server doesn't ressond to it, and in turn CWP doesn't.

In my case / tests, I don't have added in this config/file, but I have only one ipv6 per server.

When I was read your problem, I was made a ping6 to your ipv6 and not respond, its possible, in your isp your need add like you indicate, when I don't was have configured my ipv6, the ping6 respond to my ipv6 (only install centos).

Maybe, some about the isp...its very possible...

71
Yes, all its ok, the person who think in ipv6...its for kill...hehehe.

Quote
In the ifcfg-eth0 file I had to add:
IPV6ADDR_SECONDARIES="2605:a140:2045:8941::2 2605:a140:2045:8941::3 2605:a140:2045:8941::4 2605:a140:2045:8941:0:30:40b7:f60d"
(Just to start)
This is just that you was need for work with ipv6, config in ifcfg-eth0, only in this.
In the vhost files, with /64 I think its sufficient for work.

I'm very glad it works for you, and if I could be of help, all the better.

72
@Wonder did everything you suggested, but still not working.

I have a /64 allocation, and used a tool for a certain IP (Just copied the IPv4 into the IPv6 - lol)

Specified that IP [2605:a140:2045:8941:0:30:40b7:f60d]:80 and :443

You have the port's outside the IP bracket.
Created the AAAA record.
Restarted Apache.

But when I try to connect, just using the IP [2605:a140:2045:8941:0:30:40b7:f60d], it isn't working.

Also when I look at the .conf files, the IPv6 is gone.

Do I need to rebuild the webserver?

Any suggestions?

Thanks.

Hi @Starburst.

Some doubts about your issue / problem.

For know the ipv6, after made the changes in the files /etc/sysctl.conf and /etc/sysconfig/network and restart the server, you know the ipv6 with the command ifconfig, you need view the line that end in global, not with link.
This is your ipv6.

About:
Quote
Specified that IP [2605:a140:2045:8941:0:30:40b7:f60d]:80 and :443
You need indicate the ipv6 with por 80 in the "normal" domain.com.conf and the 443 in the ssl file.

If you have csf firewall you need enable ipv6 (not open the ports, just only enabled ipv6, this point I forgot in my first post).

Created the AAAA records is before edit the vhost files.

You don't need rebuild webservers, only restart httpd or server.

But other point, if you are created the AAAA records you need point or configure the ipv6 records in your domain registrar.

In my case, my isp (of my house) not have ipv6 and I'm in cloudflare, for view all work fine, I deleted the A record in cloudflare, and only have the AAAA record in cloudflare, then view how connect well to the site.
But if you aren't in cloudflare, you need create the AAAA records in you domain registrar and need to wait 12/24 for propagation this dns records.

I made a ping to your ipv6 and indicate 100% packet loss.
In this page: http://ipv6now.com.au/pingme.php

Are you sure this is your ipv6 this: 2605:a140:2045:8941:0:30:40b7:f60d ?

Regards.

74
PHP Selector / Re: PHP Selector not work
« on: December 09, 2020, 10:02:41 AM »
Solved.
After search I view the problem.
When go to enable this repo indicate not exist, for enable searh for PowerTools, if I try with powertools then work.
View this, I rename her name from powertools to PowerTools.
This change, before install cwp, then, the rest work fine.

75
@admin, I can't edit the post, edit and fix my last code, I don't end my last code.

Hi, what do you want to edit?

This:

Now, the same with the file domain.com.ssl.conf
In this case, we add:

Code: [Select]
<VirtualHost [THE IP6]:443 THE IP4:443>[/coded]
Also, in my case, are 4 lines for add the ipv6.

Then, restart apache:
[code]systemctl restart httpd


For this:
Now, the same with the file domain.com.ssl.conf
In this case, we add:

Code: [Select]
<VirtualHost [THE IP6]:443 THE IP4:443>Also, in my case, are 4 lines for add the ipv6.

Then, restart apache:
Code: [Select]
systemctl restart httpd

Pages: 1 ... 3 4 [5] 6 7