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.
Pages: [1]
1
Mod_Security / multiple issues with webftp_simple
« on: March 12, 2017, 09:43:47 AM »
For some reason webftp_simple is not excluded from Mod_Security and it's generate a lot of warnings and bans for my friends. I have to exclude it from mod_sec settings:
CWP team will be really good idea to completely disable mod sec for webftp_simple by default or add it to panel server (to be accessible on CWP ports 2030/2031) instead of to users Apache. Also roundcube and phpmyadmin is installed in users apache
Code: [Select]
# cat /usr/local/apache/modsecurity-cwaf/custom_user.conf
# Put your custom ModSecurity directives here
# Please don't remove this file
<LocationMatch /webftp_simple/>
<IfModule mod_security2.c>
SecRuleEngine Off
</IfModule>
</LocationMatch>
CWP team will be really good idea to completely disable mod sec for webftp_simple by default or add it to panel server (to be accessible on CWP ports 2030/2031) instead of to users Apache. Also roundcube and phpmyadmin is installed in users apache
2
Updates / Upgrade php 5.6 to version 5.6.29
« on: January 05, 2017, 06:40:51 AM »
CWP use php 5.6.16 which is more than 1 year old - released on 01 Oct 2015. Update is quite easy. Edit file /usr/local/src/php-5.6.sh like this :
After that install new php version with:
Code: [Select]
#version=5.6.14
version=5.6.29
phpsource="http://de1.php.net/distributions/php-$version.tar.bz2"
#phpsource="http://dl1.centos-webpanel.com/files/php/selector/php-$version.tar.bz2"
I used DE mirror because my server is located in Germany, but feel free to use any other near to you.After that install new php version with:
Code: [Select]
sh /usr/local/src/php-5.6.sh
I highly suggest CWP team to update php version - there is a lot CVE fixes between 5.6.14 and 5.6.29.
3
Scripts / basic php setup
« on: September 03, 2016, 08:42:48 AM »
Because I'm too lazy to edit all my php ini files i wrote basic stupid script to edit them instead of me The script is with hard coded values because I did it for my environment but is pretty simple to make changes for yours.
Any edits/updates are welcome
p.s Please dont comment the values of the ini files, because this is not the purpose of this thread
Code: [Select]
#!/bin/bash
INI_FILES="$(ls /opt/alt/php*/usr/php/php.ini) /usr/local/php/php.ini"
#setup some basic variables
for ini in $INI_FILES
do
#make backup just in case :)
[[ -f $ini ]] || cp $ini $ini.orig
sed -i.bak "/upload_max_filesize/c\upload_max_filesize = 16M" $ini
sed -i "/post_max_size/c\post_max_size = 32M" $ini
sed -i "/memory_limit/c\memory_limit = 256M" $ini
grep -q ^error_log $ini && sed -i "/^error_log/c\error_log = error_log" $ini || echo "error_log = error_log" >> $ini
grep -q ^date.timezone $ini && sed -i "/^date.timezone/c\date.timezone = Europe\/Sofia" $ini || sed -i "/;date.timezone/c\date.timezone = Europe\/Sofia" $ini
grep "upload_max_filesize\|post_max_size\|memory_limit\|error_log" $ini
done
service httpd restart
Any edits/updates are welcome
p.s Please dont comment the values of the ini files, because this is not the purpose of this thread
4
DNS Manager / bug with DKIM record append
« on: January 05, 2016, 06:32:11 AM »
If I append new DKIM record in the admin area the new record is broken (vim with :set list):
The problem is there no new line after the ; Add additional settings below this line or before the new DKIM record. If I append new record everything looks like normal:
Code: [Select]
; Add additional settings below this linedefault._domainkey 14400 IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCaJKTJvtbkUfGopmttOJc/9KcHOhpu000iPYzeBscEdHFWbCUM+9kFGPxkq8CxFLDWlyzPKbdhWz8eKNy39JlSDOzM6e+yZfLmZ7QBuoMuycAVP2/5wVf15QrhRYk7K9jdTzuXGHoHJnlXYOxECKufHD8uIorHhkYADHura5RvjwIDAQAB"$
The problem is there no new line after the ; Add additional settings below this line or before the new DKIM record. If I append new record everything looks like normal:
Code: [Select]
; Add additional settings below this linedefault._domainkey 14400 IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCaJKTJvtbkUfGopmttOJc/9KcHOhpu000iPYzeBscEdHFWbCUM+9kFGPxkq8CxFLDWlyzPKbdhWz8eKNy39JlSDOzM6e+yZfLmZ7QBuoMuycAVP2/5wVf15QrhRYk7K9jdTzuXGHoHJnlXYOxECKufHD8uIorHhkYADHura5RvjwIDAQAB"$
$
test 14400 IN A A.B.C.D^I; #subdomain test$
Pages: [1]