I'm using Webuzo on my first unmanaged VPS (CentOS 6.4,OpenVZ). I tried to install Mod_Security following this guide. I installed Modsecurity-apache_2.6.6 but there's a problem in Step3 that prevents me from installing OWASP Mod_Security Core Rule Set
wget http://www.modsecurity.org/download/modsecurity-apache_2.6.6.tar.gz
The Download address has been removed. So I found another guide for the rule set but I can't get this command to work
git clone https://github.com/SpiderLabs/owasp-modsecurity-crs.git
It returns "-bash: git: command not found"
What command should I use to get OWASP CRS?
Also, I suspect the mod_security installation is incomplete since httpd server is unable to restart after installing modsecurity. Here's the configuration error:
[root#xx ~]# httpd -t
Syntax error on line 7 of /etc/httpd/conf.d/modsecurity.conf:
Invalid command 'SecRuleEngine', perhaps misspelled or defined by a module not included in the server configuration
Should I uninstall Mod_Secuirty first since everything seems to have become a mess now?
Any help is appreciated.
The apache binary in case of Webuzo is located at /usr/local/apps/apache and the modules are located at /usr/local/apps/apache/modules/lib.
Also the apache configurations in case of Webuzo are located at /usr/local/apps/apache/etc/ and /usr/local/apps/apache/etc/conf.d/
It seems you are trying to compile mod_security at an inappropriate location.
As you are having error with modsecurity.conf, I wonder whether you have followed the step
Step 4: Configuring Mod_Security
In the guide you have followed.
"-bash: git: command not found"
This error can be resolved by installing the package that includes git. try
yum install git-core -y
Both guide1 and guide2 are good to install mod_sec and follow any one. :)
Related
I have a Apache2 installed with Homebrew on a Mac running OSX Monterey. I haven't done LAMP development for a while, so I'm not sure when the error started, but I've recently updated OSX to 12.5. When I returned to working on a LAMP project, my Apache installation stopped working. Running brew services produced the following output: Name Status User File httpd error 256 root ~/Library/LaunchAgents/homebrew.mxcl.httpd.plist mysql started Nizz0k ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist.
Running the stop, start, and restart commands produces "success" output in the terminal, but Apache doesn't work. I can't navigate to my local vhosts, and of course, running brew services still shows an error.
In running apachectl -e error Apache complains about permissions to the error logs
I have tried:
uninstalling and reinstalling HTTPD
The apr-utilities fix.
confirming Mac installed Apache is stopped.
At this point, I think my problem is that there was conflicting information about how to run Apache on Homebrew. Earlier versions apparently required sudo, but running it this was now produces warnings like this:
Warning: Taking root:admin ownership of some httpd paths:
/usr/local/Cellar/httpd/2.4.54/bin
/usr/local/Cellar/httpd/2.4.54/bin/httpd
/usr/local/opt/httpd
/usr/local/opt/httpd/bin
/usr/local/var/homebrew/linked/httpd
This will require manual removal of these paths using `sudo rm` on
brew upgrade/reinstall/uninstall.
Warning: httpd must be run as non-root to start at user login!
/Library/LaunchDaemons/homebrew.mxcl.httpd.plist: service already bootstrapped
Bootstrap failed: 37: Operation already in progress
Error: Failure while executing; `/bin/launchctl bootstrap system /Library/LaunchDaemons/homebrew.mxcl.httpd.plist` exited with 37.
The issue is even after removing the paths as suggested in the error, a reinstallation brings Root back as the owner.
I do have the same problem with nginx.
Manually unloaded it and then restarting it worked fine.
Try:
sudo launchctl bootout system /Library/LaunchDaemons/homebrew.mxcl.httpd.plist
sudo brew services start httpd
I am working on a project with setup PHP7.3, Drupal 6.4 with memcached. Memcached is working in server and in my local machine with windows. But I am not able to make it work in my Mac machine. I followed the below link to make this work.
https://www.journaldev.com/1/install-memcached-mac
And I tried
brew install memcached
Also.
Then added
[memcached]
extension="memcached.so"
In php.ini file. Then restarted apache. After this on the first run I got the error
{"Error Details":{"Message":"\n Error code : 32\n Message : PHP Startup: Unable to load dynamic library 'memcached.so' (tried: /usr/local/lib/php/pecl/20180731/memcached.so (dlopen(/usr/local/lib/php/pecl/20180731/memcached.so, 9): image not found), /usr/local/lib/php/pecl/20180731/memcached.so.so (dlopen(/usr/local/lib/php/pecl/20180731/memcached.so.so, 9): image not found))\n File name : Unknown\n Line no : 0\n Date :12-March-21 02:45:05\n Path : http://localhost/mysite/?q="}}
But from the second run onwards the error is not there. But memcache is not working. And I can't find the memcached.so file in my system.
How can I fix this? Please help
I tried this. It helps.
https://izziswift.com/how-to-install-memcached-module-for-php7-1-on-macos-high-sierra/
pecl bundle memcached
Change to the directory it output.
phpize
Make sure libmemcached and zlib are installed (brew install libmemcached zlib).
Get the zlib directory (brew list zlib).
./configure --with-zlib-dir=/usr/local/Cellar/zlib/1.2.11/ (replace the zlib path with the one from the previous command).
make
make install
Add the extension line in your php.ini file (ex. change the paths to match what make install output. I added this to my /usr/local/etc/php/7.4/conf.d directory in a file called ext-memcached.ini.
[memcached]
extension=memcached.so
Verify you installed the module php -m should show you memcached in the outputted list.
Have you remembered to start the service?
brew services start memcached
I need to manually install apache httpd 2.4.12 on ubuntu 13.10. For some reasons I cannot use apt-get install.
Having gone through the instructions provided for httpd installation, I execute the following commands in order
Unzip the installation that was downloaded
Navigate to the folder where the installation is present till the bin folder
Within the bin folder execute ./configure with the needed parameters.
make (Error occurs here. Unable to proceed further)
make install
When I execute the make command, I get this error
**make: *** No targets specified and no makefile found. Stop.**
Anyone has any idea where I am going wrong.
You either are
in the wrong folder (no Makefile)
failed to properly ./configure (any errors?)
configure is responsible for generating the Makefiles. If you don't succeed at configuring (maybe you are missing some library needed for compilation?) then you won't get Makefiles and cannot call make.
Never ignore errors. They are errors, after all. They'll come back to bite you.
Having an issue with php-gd
I inserted this command:
sudo apt-get install php5-curl php5-mcrypt php5-gd php5-common
throughout the process to setup Magento but when I went through Validation, this is what I got:
"PHP Extension gd must be loaded"
When the warning showed up. I tried to install it again using:
sudo apt-get install php5-gd
This was the message that I received:
"Reading package lists... Done E: Unable to locate package"
I Would like some direction on how to fix this Error.
Restarting the webserver after installing php5-gd loads the package.
check. reloading the web server. services such as php-pfm (php5-fpm), fcgi, fastcgi, etc load once and remain in the background. Adding modules does not impact the running copy. It must be restarted to load the module into active use.
Use synaptic package manager for easier installation.
After installing and it still does not work, look at the apache modules, mine is at /etc/php5/apache2/conf.d/20-gd.ini
; configuration for php GD module
; priority=20
; extension=gd.so
Even if the module exists and is installed on the system, it is commented out on the module config. Uncomment it, then restart Apache, then you should be fine.
I'm trying to set up mod_wsgi for use with Django. I have apache2, apache2-dev, python2.6, python2.6-dev all installed, but I'm getting this error when running configure:
checking for apxs2... /usr/bin/apxs2
checking Apache version... 2.2.14
checking for python... /usr/bin/python
configure: creating ./config.status
config.status: error: cannot find input file: Makefile.in
Thanks for the help!
I had the exact same problem. Installing the apache2-dev package solved it.
sudo apt-get install apache2-dev
I don't think the asker needs this answer anymore, so I answered for future readers with similar problems
Install apache2-threaded-dev:
$ sudo apt-get install apache2-threaded-dev
I started writing that you may need to ensure that you have axps installed (you can do this by installing the apache2-dev package). but I notice that configure already found axps. I had a similar problem but configure was bailing on not finding this dependency. Maybe some similar dependency or write permissions.
You are running the mod_WSGI 'configure' script in the mod_WSGI source code directory aren't you? Ie., in the same directory as the Makefile.in file that comes with the source tar ball.
mod_wsgi's configure script uses apxs to find the path to httpd:
apxs -q SBINDIR
apxs -q TARGET
Combine those with a "/" and add "-v", e.g.,
/blah/bin/httpd -v
That should run without an error. If it does not then mod_wsgi's configure script can't figure out the httpd version and you will get a broken symbolic link for Makefile.in.
For me, libpcre.so.0 wasn't in the LD_LIBRARY_PATH. Doing this:
export LD_LIBRARY_PATH=/usr/local/lib
then reconfiguring mod_wsgi and building fixed the problem.