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

Pages: [1]
1
CentOS 7 Problems / Re: Problem with mod_security
« on: February 03, 2017, 01:57:18 AM »
From my other support ticket, hope it helps you:

OK so there is some sort of issue with the CWP install process for mod_security2.

Workaround is:

- Install modsecurity through CWP GUI so it generates the main config and OWASP rules

- Then reinstall mod_security2 manually to overwrite the issue with mod_security.so:

#Download ModSecurity
wget https://www.modsecurity.org/tarball/2.9.1/modsecurity-2.9.1.tar.gz
wget https://www.modsecurity.org/tarball/2.9.1/modsecurity-2.9.1.tar.gz.sha256

#Config checksum of download
sha256sum -c modsecurity-2.9.1.tar.gz.sha256

#Install ModSecurity:
tar -xvf modsecurity-2.9.1.tar.gz
cd modsecurity-2.9.1
./configure --with-apxs=/usr/local/apache/bin/apxs
make
sudo make install
cp /usr/local/modsecurity/lib/mod_security2.so /usr/local/apache/modules

Restart Apache, fixed!

If this was helpful let me know, spent a couple of hours getting to the bottom of it in preparation for centos CWP 6 to 7 migration.

Cheers.

2
Apache / Re: Apache failed to start unable to load modules/mod_security2.so
« on: February 03, 2017, 01:55:41 AM »
OK so there is some sort of issue with the CWP install process for mod_security2.

Workaround is:

- Install modsecurity through CWP GUI so it generates the main config and OWASP rules

- Then reinstall mod_security2 manually to overwrite the issue with mod_security.so:

#Download ModSecurity
wget https://www.modsecurity.org/tarball/2.9.1/modsecurity-2.9.1.tar.gz
wget https://www.modsecurity.org/tarball/2.9.1/modsecurity-2.9.1.tar.gz.sha256

#Config checksum of download
sha256sum -c modsecurity-2.9.1.tar.gz.sha256

#Install ModSecurity:
tar -xvf modsecurity-2.9.1.tar.gz
cd modsecurity-2.9.1
./configure --with-apxs=/usr/local/apache/bin/apxs
make
sudo make install
cp /usr/local/modsecurity/lib/mod_security2.so /usr/local/apache/modules

Restart Apache, fixed!

If this was helpful let me know, spent a couple of hours getting to the bottom of it in preparation for centos CWP 6 to 7 migration.

Cheers.

3
Apache / Re: Apache failed to start unable to load modules/mod_security2.so
« on: February 02, 2017, 07:10:01 PM »
Yes I attempted this first and apache rebuild, are there any other module dependencies that might not be turned on in apache? Also I note that mod_security2.so has different permissions in the modules folder to all others is this correct?

Thanks Chris

4
Apache / Apache failed to start unable to load modules/mod_security2.so
« on: February 02, 2017, 04:19:34 AM »
Hi,

I've just built a fresh install of centos 7 CWP in preparation for migration from centos 6 CWP.

All gone well apart from the install of mod_security, after install Apache fails to start with the following error log:

 httpd.service - Web server Apache
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2017-02-02 17:08:28 NZDT; 3min 1s ago
  Process: 21127 ExecStop=/usr/local/apache/bin/apachectl graceful-stop (code=exited, status=1/FAILURE)
  Process: 20817 ExecReload=/usr/local/apache/bin/apachectl graceful (code=exited, status=1/FAILURE)
  Process: 21132 ExecStart=/usr/local/apache/bin/apachectl start (code=exited, status=1/FAILURE)
 Main PID: 16577 (code=exited, status=0/SUCCESS)

[1]: Starting Web server Apache...
[21132]: httpd: Syntax error on line 508 of /usr/local/apache/conf/httpd.conf: Syntax error on line 9 of /usr/local/apache/conf.d/mod_security.conf: Cannot load modules/mod_security2.so into server: /usr/local/apache/modules/mod_security2.so: undefined symbol: apr_crypto_block_cleanup
[1]: httpd.service: control process exited, code=exited status=1
[1]: Failed to start Web server Apache.
[1]: Unit httpd.service entered failed state.
[1]: httpd.service failed.

Any help would be greatly appreciated.

Another thing I've noted is the enabled modules don't work on Apache rebuild and have to be activated manually in config.

Thanks,
Chris

5
Installation / Re: Centos 6 install on dedicated server
« on: January 26, 2017, 11:44:51 AM »
Hello,

Something is wrong with the current install, because I have used the CWP on this server half years ago.
After install, I want to use the "Apache & Nginx Reverse Proxy" option.
After that and after rebuild vhosts the netstat block is empty.
In SSH:
service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: httpd: Syntax error on line 419 of /usr/local/apache/conf/httpd.conf: Syntax error on line 2 of /usr/local/apache/conf.d/rpaf.conf: Cannot load /usr/local/apache/modules/mod_rpaf.so into server: /usr/local/apache/modules/mod_rpaf.so: cannot open shared object file: No such file or directory
                                                           [FAILED]




Other info for help: why I get this warning on all page:

Warning: [obfuscated](): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /usr/local/cwpsrv/htdocs/admin/index.php on line 0

Warning: [obfuscated](http://centos-webpanel.com/webpanel/main.php?app=ads_all): failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /usr/local/cwpsrv/htdocs/admin/index.php on line 0


Any update on this? I have this php_network error also, completely out of the blue, no issues for months.

6
Backup / Full Restore On Remote Server
« on: September 15, 2016, 06:32:54 AM »
Hi Everyone,

I am trying to migrate to a fresh CWP server build running MariaDB 10.1 from the old one running MySQL 5.1.

I successfully setup remote backup to transfer all the \home directories and DBs then restored them each successfully through phpMyAdmin and the restore backup tab. After restoring all the databases and user directories everything seems fine but I can't get Apache to start properly as it thinks the users don't exist "Starting httpd: httpd: bad user name xxxxxx".

If I clear the vHosts file Apache starts correctly and if I create a new user on the server and only list that in vHosts there are no problems.

If I try and delete one of the restored users it says "userdel: user 'xxxxxx' does not exist" "User Account Removal FAILED! User account folder still exists!" it seems like this a suphp/suexec problem but this is getting to the limit of my experience level.

Does anyone have a possible solution? I feel like it is probably very simple and i'm very close but I just simply don't have the knowledge yet to know where to look.

Love the project and appreciate your work.

Many thanks,
Chris

Pages: [1]