• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Wordpress FastCGI Problem - Can I use Plesk to Fix It?

pould

Basic Pleskian
Hi folks?

I have a problem with Wordpress hosted on the latest version of Plesk 11 for CentOs where WordPress appears to think I'm spamming the installation. I've checked out the Wordpress forums (see here for example - http://wordpress.org/support/topic/cant-post-after-352-upgrade-modsecurity-problem).

So....

My question is this - can I whitelist my IP address on Plesk (I have a VPS) OR do I need to contact my hosting firm? If I can whitelist it myself, how and where do I do that?

Thanks for your help.
 
Do you mean are you getting the issues while update your site post ? And when you want to add your IP in allow list ? For mod_sec OR firewall ?
 
Do you mean are you getting the issues while update your site post ? And when you want to add your IP in allow list ? For mod_sec OR firewall ?

Thanks for your reply.

What I mean is that I get the error message when I try to edit a Wordpress post. I understand that the problem is caused by a security issue, but I'm unsure how to fix it in Plesk (if indeed I can).
 
Last edited:

Thank you for this.

I followed the instructions to change my vhost.conf file using vim. The file now reads:


-------------------
#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
#
#IF YOU REQUIRE TO APPLY CUSTOM MODIFICATIONS, PERFORM THEM IN THE FOLLOWING FILES:

#/var/www/vhosts/peter-ould.net/conf/vhost.conf

<IfModule mod_security2.c> SecRuleEngine Off </IfModule>

# Timeout
--------------

When I run "/usr/local/psa/admin/bin/websrvmng -v -a" I then get a failure report.

----------------

WARNING: You are using obsolete option, use corresponding option of httpdmng.
websrvmng: /usr/local/psa/admin/sbin/httpdmng execution failed:
Execution failed.
Command: httpdmng
Arguments: Array
(
[0] => --reconfigure-domains
[1] => s17252700.onlinehome-server.info,andrew-johnson.org,gransgripes.co.uk,harlow-conservatives.co.uk,twurchofengland.org.uk,electiongame.co.uk,peter-ould.net
)

Details: 2014-05-13T08:41:40+01:00 ERR (3) [util_exec]: proc_close() failed
2014-05-13T08:41:43+01:00 ERR (3) [util_exec]: proc_close() failed
2014-05-13T08:41:44+01:00 ERR (3) [panel]: Apache config (13999668970.93462800) generation failed: Template_Exception: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 5 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 66 of /etc/httpd/conf/plesk.conf.d/server.conf: Syntax error on line 131 of /etc/httpd/conf/plesk.conf.d/ip_default/peter-ould.net.conf: Syntax error on line 10 of /var/www/vhosts/system/peter-ould.net/conf/vhost.conf: <IfModule takes one argument, Container for directives based on existance of specified modules

file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 68
code: 0
httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 5 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 66 of /etc/httpd/conf/plesk.conf.d/server.conf: Syntax error on line 131 of /etc/httpd/conf/plesk.conf.d/ip_default/peter-ould.net.conf: Syntax error on line 10 of /var/www/vhosts/system/peter-ould.net/conf/vhost.conf: <IfModule takes one argument, Container for directives based on existance of specified modules


websrvmng: /usr/local/psa/admin/sbin/httpdmng execution failed:
Execution failed.
Command: httpdmng
Arguments: Array
(
[0] => --reconfigure-domains
[1] => s17252700.onlinehome-server.info,andrew-johnson.org,gransgripes.co.uk,harlow-conservatives.co.uk,twurchofengland.org.uk,electiongame.co.uk,peter-ould.net
)

Details: 2014-05-13T08:41:40+01:00 ERR (3) [util_exec]: proc_close() failed
2014-05-13T08:41:43+01:00 ERR (3) [util_exec]: proc_close() failed
2014-05-13T08:41:44+01:00 ERR (3) [panel]: Apache config (13999668970.93462800) generation failed: Template_Exception: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 5 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 66 of /etc/httpd/conf/plesk.conf.d/server.conf: Syntax error on line 131 of /etc/httpd/conf/plesk.conf.d/ip_default/peter-ould.net.conf: Syntax error on line 10 of /var/www/vhosts/system/peter-ould.net/conf/vhost.conf: <IfModule takes one argument, Container for directives based on existance of specified modules

file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 68
code: 0
httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 5 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 66 of /etc/httpd/conf/plesk.conf.d/server.conf: Syntax error on line 131 of /etc/httpd/conf/plesk.conf.d/ip_default/peter-ould.net.conf: Syntax error on line 10 of /var/www/vhosts/system/peter-ould.net/conf/vhost.conf: <IfModule takes one argument, Container for directives based on existance of specified modules


[root@s17252700 vhosts]# vim /var/www/vhosts/peter-ould.net/conf/vhost.conf
[root@s17252700 vhosts]# vim /var/www/vhosts/peter-ould.net/conf/vhost.conf
[root@s17252700 vhosts]# /usr/local/psa/admin/bin/websrvmng -v -a
WARNING: You are using obsolete option, use corresponding option of httpdmng.
websrvmng: /usr/local/psa/admin/sbin/httpdmng execution failed:
Execution failed.
Command: httpdmng
Arguments: Array
(
[0] => --reconfigure-domains
[1] => s17252700.onlinehome-server.info,andrew-johnson.org,gransgripes.co.uk,harlow-conservatives.co.uk,twurchofengland.org.uk,electiongame.co.uk,peter-ould.net
)

Details: 2014-05-13T08:48:32+01:00 ERR (3) [util_exec]: proc_close() failed
2014-05-13T08:48:35+01:00 ERR (3) [util_exec]: proc_close() failed
2014-05-13T08:48:36+01:00 ERR (3) [panel]: Apache config (13999673090.99254000) generation failed: Template_Exception: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 5 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 66 of /etc/httpd/conf/plesk.conf.d/server.conf: Syntax error on line 131 of /etc/httpd/conf/plesk.conf.d/ip_default/peter-ould.net.conf: Syntax error on line 10 of /var/www/vhosts/system/peter-ould.net/conf/vhost.conf: <IfModule takes one argument, Container for directives based on existance of specified modules

file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 68
code: 0
httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 5 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 66 of /etc/httpd/conf/plesk.conf.d/server.conf: Syntax error on line 131 of /etc/httpd/conf/plesk.conf.d/ip_default/peter-ould.net.conf: Syntax error on line 10 of /var/www/vhosts/system/peter-ould.net/conf/vhost.conf: <IfModule takes one argument, Container for directives based on existance of specified modules


websrvmng: /usr/local/psa/admin/sbin/httpdmng execution failed:
Execution failed.
Command: httpdmng
Arguments: Array
(
[0] => --reconfigure-domains
[1] => s17252700.onlinehome-server.info,andrew-johnson.org,gransgripes.co.uk,harlow-conservatives.co.uk,twurchofengland.org.uk,electiongame.co.uk,peter-ould.net
)

Details: 2014-05-13T08:48:32+01:00 ERR (3) [util_exec]: proc_close() failed
2014-05-13T08:48:35+01:00 ERR (3) [util_exec]: proc_close() failed
2014-05-13T08:48:36+01:00 ERR (3) [panel]: Apache config (13999673090.99254000) generation failed: Template_Exception: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 5 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 66 of /etc/httpd/conf/plesk.conf.d/server.conf: Syntax error on line 131 of /etc/httpd/conf/plesk.conf.d/ip_default/peter-ould.net.conf: Syntax error on line 10 of /var/www/vhosts/system/peter-ould.net/conf/vhost.conf: <IfModule takes one argument, Container for directives based on existance of specified modules

file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 68
code: 0
httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 5 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 66 of /etc/httpd/conf/plesk.conf.d/server.conf: Syntax error on line 131 of /etc/httpd/conf/plesk.conf.d/ip_default/peter-ould.net.conf: Syntax error on line 10 of /var/www/vhosts/system/peter-ould.net/conf/vhost.conf: <IfModule takes one argument, Container for directives based on existance of specified modules

------------

Regardless, I restarted the Apache server. It fell over. I removed the line from the config file, reset everything and restarted the apache server and we're back where we started.

Should I try to make the change in .htaccess instead? Am I doing something obviously wrong?
 
Hello,

First I will suggest you check your error logs and try to find out which mod_sec rule is blocking your access and then try to change your .htaccess OR directly disable that rules on your server
 
Hello,

First I will suggest you check your error logs and try to find out which mod_sec rule is blocking your access and then try to change your .htaccess OR directly disable that rules on your server

Hi Inders,

I stuck the following .htaccess file in my wp-admin sub-folder and it seems to have worked.

<IfModule mod_security.c>
SecFilterInheritance Off
</IfModule>

That seems to have solved the problem - turns off server security restrictions (looking at the logs it was treating the multiple write attempts from within wp-admin as spamming) whilst in the WP backend and leaves the front-end secure.

Thanks for your help.
 
Forget that - it's still not working.

I'll try to look at the logs more closely this weekend.
 
So,

I've looked at this in a number of places. Looks like there is a problem with WP in conjuction with mod_sec treating autosaves of posts as a spam attack (lots of calls on the server - panic!!!!) and therefore it locks down the installation.

I'm going to try and lengthen the autosave interval to see if that helps, but have you got any ideas?

Thanks for your help,

Peter+
 
Back
Top