Why ? Whats should be a better solution ?
How do I know if my apache is non-evented or not?
apache2 -t -D DUMP_MODULES | grep mpm_
This will show which MPM (multi processing module) your Apache uses.
mpm_worker_moduleis hybrid with one thread per connection,
mpm_prefork_moduleis traditional with one process per connection.
For what it’s worth, I dumped apache in favour of nginx. It was a pain to get everything working properly, but some google-fu sorted me out.
Apologies to bump up an old topic.
The setup as described above has worked for me flawlessly up until today. Now I get a 502 Bad Gateway error when trying to access my site. Apache error log says the following:
[Tue Jan 13 19:02:44.709212 2015] [proxy:error] [pid 969] (111)Connection refused: AH00957: HTTP: attempt to connect to 127.0.0.1:8080 (localhost) failed [Tue Jan 13 19:02:44.709270 2015] [proxy:error] [pid 969] AH00959: ap_proxy_connect_backend disabling worker for (localhost) for 60s [Tue Jan 13 19:02:44.709281 2015] [proxy_http:error] [pid 969] [client 192.168.88.103:55068] AH01114: HTTP: failed to make connection to backend: localhost [Tue Jan 13 19:02:44.709327 2015] [proxy:error] [pid 969] AH00940: HTTP: disabled connection for (localhost)
UPDATE: rebuilding the app solved the issue
I apologize for reviving this thread, hopefully you can advise. I am running into a problem, while using your solution.
When I restart Apache2 I get this error:
root@webserver:~# service apache2 restart
- Restarting web server apache2 [fail]
- The apache2 configtest failed.
Output of config test was:
AH00526: Syntax error on line 33 of /etc/apache2/sites-enabled/000-default.conf:
Invalid command ‘ProxyPreserveHost’, perhaps misspelled or defined by a module not included in the server configuration
Action ‘configtest’ failed.
The Apache error log may have more information.
I have tried changing that line to see if it does something else but I am stuck as to why it won’t work.
I would like to add Pound to that list, since it is very comfortable to handle and much easier to configure than e.g. Varnish.
Pound is easier to configure than Varnish because it only does half of what Varnish does. It’s closer in functionality to haproxy.
ProxyPreserveHost is provided by
mod_proxy; you’ll need to enable that module in your Apache configuration (the details of how to do that vary by OS, distribution, and Apache version) in order to make that configuration directive work.
Please make a tutorial.
Any chance you could share what the DocumentRoot should be if you don’t have a fancy symlink?
Whatever the “fancy symlink” would otherwise point to.
Clearly. What’s the default document root of Discourse?
So when you installed discourse did you do it in /var/discourse or /var/www/discourse.domain.com ?
Hopefully, neither. Discourse runs from a Docker container.