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

Pages: [1]
1
CentOS 7 Problems / Re: Cwppro - Huge log files in
« on: November 21, 2020, 06:52:14 PM »
Thank you. That worked with a little twining.

For the domlogs I enabled log rotate from cwp admin
->
File manager -> Logrotate manager -> Add new conf file
at filename I put
domlogs

As contents I used:

Code: [Select]
/usr/local/apache/domlogs/*.log {
    rotate 7
    daily
    missingok
    notifempty
    sharedscripts
    compress
    minsize 1048576
    delaycompress
    postrotate
/bin/kill -HUP `cat /usr/local/apache/logs/httpd.pid 2>/dev/null` 2> /dev/null || true
    endscript
}
After clicking save, I also run it once.

2
PHP / Re: php.ini configuration per user
« on: November 21, 2020, 06:38:04 PM »
So the "correct" way to do this is to:
From cwp admin panel
webserver settings -> WebServers Template Editor -> Php-fpm
Pick a file and click clone (I picked processes-50.tpl)
name it processes-51.tpl

add to the end
Code: [Select]
php_admin_value[open_basedir] = /home/%username%:/tmp
Then go to
webserver settings -> WebServers Main conf
go to the bottom
PHP-FPM Service Configuration
Choose from PHP-FPM default template: the template you just created, ffor example processes-51.tpl

check the Rebuild all vhosts on save

click save

3
CentOS 7 Problems / Re: Cwppro - Huge log files in
« on: November 20, 2020, 06:33:41 PM »
Unfortunately it is the same for .user.ini.
The only way i could affect the php info is to put the open_basedir= /home:/tmp:/var/tmp:/usr/local/lib/php/
inside /opt/alt/php-fpm73/usr/php/php.ini using the cwp php.ini editor from "PHP FPM SELECTOR" menu and reloading php-fpm

4
CentOS 7 Problems / Re: Cwppro - Huge log files in
« on: November 20, 2020, 05:49:58 PM »
Thank you for taking interest on a noob.
I think, the files where created where they should have been:
Code: [Select]
[root@srv ~]# ./phpopenbasedir
/home/byron/php.ini exists.
/home/Byron/php.ini exists.
/home/chalioti/php.ini exists.
/home/estudy1n/php.ini exists.
/home/jfoundis/php.ini exists.
and
Code: [Select]
[root@srv ~]# cat /home/byron/php.ini
open_basedir = /home/byron/:/tmp:/var/tmp:/usr/local/lib/php/

I think there is an issue with fpm and php.ini / .user.ini

Someone else also reported it at http://forum.centos-webpanel.com/index.php?topic=294.0

I think the fpm simply is not reading the php.ini from inside the users root directory.

PS. You are already setting the full path for i at /home/ thats why it is not needed. If you use it as you have written it will produce a "/home/home/username....".

5
PHP / Re: php.ini configuration per user
« on: November 20, 2020, 04:52:57 PM »
I have the same issue. I am using this guide https://wiki.centos-webpanel.com/php-open_basedir but the per user does not work.

6
CentOS 7 Problems / Re: Cwppro - Huge log files in
« on: November 20, 2020, 03:44:13 PM »
much wow, very thanx.

Just for reference
Code: [Select]
cd
Code: [Select]
nano phpopenbasedir
Code: [Select]
#!/usr/bin/bash
for i in /home/*
 do
   FILE=$i/php.ini
   if [[ -f "$FILE" ]]; then
     echo "$FILE exists."
   else
     echo "open_basedir = $i/:/tmp:/var/tmp:/usr/local/lib/php/" > $i/php.ini
     chown root.root $i/php.ini
     chmod 555 $i/php.ini
   fi
 done

(I did not need the second home in "/home/$i/php.ini)

Code: [Select]
chmod +x phpopenbasedir
Now I need a way to run this at every account creation.

PS. Unfortunately phpinfo() shows open_basedir as empty. Maybe its because I have chosen in cwp the nginx, apache, varnish option with the php-fpm option forced?

7
CentOS 7 Problems / Re: Cwppro - Huge log files in
« on: November 20, 2020, 02:23:58 PM »
No I have not. I supposed that its enabled by default.
I could not find any option for this in the panel. Only this article.
https://wiki.centos-webpanel.com/php-open_basedir
So I will have to manually create the php file for each user? Thats .... extreme :D

8
CentOS 7 Problems / Re: Cwppro - Huge log files in
« on: November 19, 2020, 04:05:03 PM »
So I found a semi solution here http://forum.centos-webpanel.com/index.php?topic=6156.0
But the question still stands How can I put a size limit to this or tie them with the users quota space?
You read/learn about logrotate and CWP even provide you with a GUI to configure.

Thank you for the answer, thats what I did, but it is not logical for this to happen in the first place. (it does not happen with other panels for example).

Logs should be moved inside users directories (so each user should be responsible for his space) and their size should be contained with the installation of cwp.
What if a user creates huge logfiles on purpuse in minutes? Logrotate cannot help you (in my knowleage) in this case and a user can destroy the whole server.

I think yoast or user activity monitor caused the issue.

9
CentOS 7 Problems / Re: Cwppro - Huge log files in
« on: November 18, 2020, 06:52:29 PM »
So I found a semi solution here http://forum.centos-webpanel.com/index.php?topic=6156.0
But the question still stands How can I put a size limit to this or tie them with the users quota space?

10
CentOS 7 Problems / Cwppro - Huge log files in
« on: November 18, 2020, 05:46:38 PM »
in /usr/local/apache/domlogs I saw some huge logs. I deleted them and after 24 hours I again see logs around 300GBs (server full  :P)

How can I put a size limit to this or tie them with the users quota space?

Thank you.

Pages: [1]