apache2
Failed Apache2 start, no error log
Syntax errors in the config file seem to cause problems. I found what the problem was by going to the directory and excuting this from the command line. httpd -e info This gave me the error Syntax error on line 156 of D:/…/Apache Software Foundation/Apache2.2/conf/httpd.conf: Invalid command ‘PHPIniDir’, perhaps misspelled or defined by a module … Read more
“OR” Flag in .htaccess mod_rewrite
From http://httpd.apache.org/docs/current/mod/mod_rewrite.html ornext|OR (or next condition) Use this to combine rule conditions with a local OR instead of the implicit AND. Typical example: RewriteCond %{REMOTE_HOST} ^host1 [OR] RewriteCond %{REMOTE_HOST} ^host2 [OR] RewriteCond %{REMOTE_HOST} ^host3 RewriteRule …some special stuff for any of these hosts…
Apache: Restrict access to specific source IP inside virtual host
For Apache 2.4, you would use the Require IP directive. So to only allow machines from the 192.168.0.0/24 network (range 192.168.0.0 – 192.168.0.255) <VirtualHost *:80> <Location /> Require ip 192.168.0.0/24 </Location> … </VirtualHost> And if you just want the localhost machine to have access, then there’s a special Require local directive. The local provider allows … Read more
Which one to use : Expire Header, Last Modified Header or ETags
Expires and Cache-Control are “strong caching headers” Last-Modified and ETag are “weak caching headers” First the browser checks Expires/Cache-Control to determine whether or not to make a request to the servers. If it has to make a request, it will send Last-Modified/ETag in the HTTP request. If the Etag value of the document matches that, … Read more
php.ini changes, but not effective on Ubuntu
I have solved my question. There is a syntax error in php.ini in line 109, so the next all syntax does not execute.
X-Pad: avoid browser bug header added by apache
Nope, it’s a vestigial header nowadays; that is to say, it was put there to work around a bug in a browser which is obsolete (several generations older than IE6 – the bug was reported fixed as of 1997, 15 years ago!) and nobody uses it any more. The patch to remove it is in … Read more
Multiple mod_wsgi apps on one virtual host directing to wrong app
I’ve had multiple WSGI apps running on a single Apache install, and found that the easiest thing to do is just have multiple process groups– one for each of the apps. One downside, versus actually trying to get a single process to run both (or more) apps, is that this might use a little more … Read more
Proxying with SSL [closed]
figured it out… apparently I can do this: SSLProxyEngine On RequestHeader set Front-End-Https “On” ProxyPass / https://win.acme.com/ ProxyPassReverse / https://win.acme.com/ CacheDisable * and it works just fine! [the solution came from mikeg’s posting on 3cx.org]
How to install & configure mod_wsgi for py3
sudo apt-get install libapache2-mod-wsgi-py3 This will replace libapache2-mod-wsgi and will restart the apache service. More specific instructions (Django) are available for here: https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/modwsgi/