I'm having a strange issue with Ubuntu 18.04 and Nginx with ModSecurity. I've compiled everything correctly and it's working when activating the ModSecurity module, however whenever I activate a rule, I get the following:
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_M_construct null not valid
Nginx crashes and doesn't serve the page - any ideas?
I'm having this issue in Ubuntu 16.04 as well. This seems to be an issue with the latest version of ModSecurity as seen in this bug: https://github.com/SpiderLabs/ModSecurity/issues/2180
If you downloaded ModSecurity via git, you can use this command to get back to a working version:
git reset --hard d5b93c1013ca9c9a96c75369576b54832e9a2b48
Then clean your ModSecurity build directory and build it again. Once you have ModSecurity rebuild, restart nginx. Once the above bug is closed in GitHub, it will probably be safe to update to the latest version again.
Edit: This issue has been corrected. Simply update and recompile ModSecurity.
Related
I am trying to compile ModSecurity for the Nginx OSS web server. I have followed all of the instructions from their "Quick Start Guide", but am running into an issue. After linking up the new module, the config test fails.
Error output from /var/log/nginx/error.log is:
2018/02/10 00:47:51 [emerg] 6026#6026: module "/usr/share/nginx/modules/ngx_http_modsecurity_module.so" is not binary compatible in /etc/nginx/modules-enabled/50-mod-http-modsecurity.conf:1
originally the dynamic module was compiled with
sh
./configure --with-compat --add-dynamic-module=../ModSecurity-nginx
but this results in the error.
from what I've read, I need to compile the module with identical options as the existing Nginx instance.
I found the current options using nginx -V, and then re-ran the ./configure using all of the output options, but this gives the same error.
Can anyone point me down the right path here?
Thanks for any help.
UPDATE 10/29/18
It seems the original binary also needs to be compiled with the --with-compat flag. I have submitted a bug report on the issue that can be found here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897926
Maybe it can get some traction.
I had a similar issue. I was using Nginx 1.10.3 which is the default for Debian Stretch. This version does not seem to work with the latest Nginx ModSecurity connector.
I removed the default Nginx version and installed the latest stable Nginx from http://nginx.org/en/linux_packages.html. After that I was able to install and load the ModSecurity module for Nginx without problems. I followed this guide: https://www.linuxjournal.com/content/modsecurity-and-nginx for installing the ModSecurity module for Nginx.
The latest stable version of Nginx which is 1.14.2 supports the --with-compat flag. When compiling Nginx source code make sure to use the same compiler options that were used with your running Nginx. To find out which compile time options were used to build your currently running Nginx, run the command: nginx -V
I haven't been able to install new plugins or updating plugins after upgrading to wordpress 4.3 on my Ubuntu Server 12.04.5 32bit machine. Usually I could just do it by clicking on the "update" link that's associated with a specific plugin. And it will update it successfully with less than a minute. But this time, it took so long and at the end, it threw out error "download failed, couldn't connect to host".
Then, I thought and guessed that it might be to do with the new wordpress 4.3. So I downgraded it back to previous version 4.2.4 and tried to update the plugin that needs updating. It also took so long and in the end, gave the same error message.
The strange thing is that I haven't made any changes to my Ubuntu server in terms of firewall at all.
My installed PHP version is 5.5.25 and apache is 2.4.12.
The permission of my wp-config.php is 644.
I don't know what else to look. Any help would be greatly appreciated.
Thank you in advance
did you install the correct .dll files in system directory? uninstall the program and try running a system repair and .dll file patcher
I issued the following commands to my Debian Server apt-get update, and then apt-get upgrade, after which whenever I visit my site (fundlined.com) it returns a NGINX 404 Not Found Error. It's probably caused due to certain files being over written.
I tried to search for any overwritten code, but can't seem to find any.
What changes should I make, in order to fix this issue?
I also experienced this issue.
After checking virtual host file as to where the right error and access log were, I found that it runs on fast-cfi not php5-fpm which conflicts after upgrade. So I removed php5-fpm, stopped it and started fastci.
I was trying to move my Drupal site from my WAMP server to another computer's WAMP server and I followed all the necessary steps but I faced the error below. I tried updating but it didn't work.
Fatal error: Call to undefined function cache_get() in C:\wamp\www\try\includes\bootstrap.inc on line 901
I am using PostgreSQL and PhpPgAdmin. Any ideas?
See if Memcache is used in previous server.
If not see if some other cacheing mechanism like varnish cache is used
If none of the above:
When you type drush in the command line probably you reached the right place to solve you problem. This error arises when drush is not update and this occurs when you install drush from official repository in Ubuntu. The workaround is easy: just install a new version of drush! And to do so, you have to install from backported package of Ubuntu.
I've followed the instructions for installing phusion passenger with nginx in ubuntu. I had some issues while installing since I use rvm and I had to install as root and the installer was failing to find rake so i temporarily chmoded /opt to be owned by my user and after installation I resetted ownership to root. I can see nginx welcome page but when I try to visit a sinatra app I get forbidden, the virtual host is pointed to the sinatra app public dir and the permissions for the whole app are 777.
Try Passenger 3. It automatically detects most permission problems and tells you how to fix them.
If this is for a production system, you really don't need the flexibility of RVM as you should be using a single stable version of Ruby and Rails for Phusion. Install the version you need, using Aptitude if that version is available, and be done with it.
Because this is the page that Google brought me to for my issue, which isn't a Passenger issue, but a Nginx reverse-proxy issue, you need to add the line
disable :protection
somewhere in your sinatra app. I have mine at the very end, outside any method (in global scope).
Well my mistake was not using rvmsudo to install nginx with passenger, instructions here: http://rvm.io/integration/passenger/.