How can I disable the switch back to mpm_prefork by Apache Security update? - apache

my Apache2 on Ubuntu 16.04 runs mpm_event, but on every Security Update Apache switch back to mpm_prefork. Why and how can I disable this, so mpm_event is still configured?
I found this: https://ubuntu101.co.za/apache-web-server/fix-apache-2-4-loading-wrong-mpm-worker-module/
But this don't work for me. After a security update I get the error message: "No MPM is configured". So my Apache don't run.
Did you have an idea?

Same problem. However, I found that if I commented out the lines as described in https://ubuntu101.co.za/apache-web-server/fix-apache-2-4-loading-wrong-mpm-worker-module/ but then also added the line below underneath the commented-out lines in each file, mpm_prefork was disabled when updating. This worked for me on both Ubuntu 16.04 and 18.04.
LoadModule mpm_event_module /usr/lib/apache2/modules/mod_mpm_event.so
Doing this generated warnings about php-fpm and proxy_fcgi not being enabled but checking showed that they were actually still enabled.

Related

M1 BigSur httpd error LaunchAgents/homebrew.mxcl.httpd.plist

I am a bit confused that Apache httpd.conf not in the /usr/local/etc/ anymore, because there is no visible etc/ folder in the local. It's being empty. So did a bit search and found the a httpd.conf in the /etc/apache2/httpd.conf not very sure it is the right file, because it looks bit different. Anyway the below issue started after loading brew install httpd
httpd error LaunchAgents/homebrew.mxcl.httpd.plist
when I use the command brew services start httpd it gives the message of ==> Successfully started httpd (label: homebrew.mxcl.httpd) but when I check the services list I see the httpd error. And when I try to reach localhost I see It works message but when I refresh the page no more It works message and I only see the localhost refused to connect.
what is the correct way to install and run the apache?

Apache httpd is not restarting in centos

I install Zend server CE 5.6. With that Apache is installed automatically. Now I want to restart Apache server then it is showing error
click here for image to see exact error
any help
why i cannot restart apache httpd service.....?
Well you got some syntax error in httpd.conf and zedserver_php.conf.
For libphp5.so, check if the user apache can access to usr/local/zend/lib/apache2/libphp5.so.
First look, I think you have some error in httpd.conf and zedserver_php.conf and that apache can't access to httpd.conf and zedserver_php.conf.

Local site not running under MAMP after Yosemite upgrade

I just upgraded to Yosemite and noticing problems with MAMP. I was running Piwik locally (port 7788) before the upgrade, and it worked perfectly. Now, however, when I start MAMP I just get a 500 Internal Server Error.
Some searching around suggested that one issue was that MAMP was using Port 8888 for Apache and 8889 for MySQL, whereas they should now be changed to Port 80 and 3306 respectively (the default ones for those apps). This didn't change anything for me though.
I also read it could be an issue around PHP and a suggestion was to go to \etc\apache2\httpd.conf and uncomment the line LoadModule php5_module libexec/apache2/libphp5.so, again this did nothing.
I don't know enough about Apache2/MySQL/PHP to trawl through them and figure anything out so I'm hoping someone here can suggest how I go about correcting this.
MAMP will use it's own version of Apache2 so you will need to change the settings/ uncomment the modules in that httpd.conf file.
/etc/apache2/ is the default server preinstalled on the machine, which is different to MAMP's
Try looking for it here: Applications ▸ MAMP ▸ conf ▸ apache

How to disable mod_log_sql with Apache and Phusion Passenger

I'm running a RubyOnRails application with the following setup:
apache 2.2.9
passenger 2.2.8
rails 2.3.8
MySQL 5.1
when I look at the apache2 error log, I see a lot of the following errors:
[error] mod_log_sql: insufficient configuration to establish database link
[error] mod_log_sql:child spawned but unable to open database link
Since I don't see any mod_log_sql reference in the apache.conf or httpd.conf, I suspect it was enabled by Passenger.
My questions are:
Do these connection establishing hurt performance?
How do I disable the mod_log_sql
Thanks
I don't think mod_log_sql is enabled by default.
Somebody may have set it up using a2enmod on your machine, check with apache2ctl -M
mod_log_sql is used to log in the db, it can co-exist or replace the regular Apache logging system. If you don't require it, you can disable it using a2dismod mod_log_sql .
If you still want to enable it. check here to properly set it up :
http://www.outoforder.cc/projects/apache/mod_log_sql/docs-2.0/?chapter=/3/
Usually it will affect performance, depending upon how you set it up. If you setup loggin on the same mysql server as your app, yes it would affect performance (Depending on traffic tho).

Will this config error stop apache from restarting

I have a production website running apache on linux. There are all sorts of rules set up which I don't want to mess with.
I need to restart apache so I decided to do a configtest first to check that everything was ok.
My question is, will apache restart given this error?
>$ service httpd configtest
Syntax error on line 129 of /etc/httpd/conf.d/ssl.conf:
SSLCertificateFile: file '/etc/httpd/conf/ssl.crt/server.crt' does not exist or is empty
I didn't change the ssl.conf, I don't know who did, I don't know how to fix it. Apache is running fine now. Can I safely restart apache and expect it to come up? If there were more errors than this one would they show - or does configtest stop after the first error?
I think that Apache hangs on any error, specially syntax errors.