How to use the setEnv variable in apache?

SetEnv sets a particular variable to some value, so you need something like SetEnv varname varvalue If this is for a specific virtual host, and you have access to the Apache configuration files, this would go inside the <VirtualHost> directive for that virtual host. If you don’t have control of the config files, you’ll need … Read more

docker/httpd: Configuration error: No MPM loaded

(edit, thanks delboy1978uk) The error could be avoided if applied a simple best practice: pin your docker images to a specific version instead of latest. After digging the commits of the official httpd image, I found the solution. (maybe this question/answer may help others) For those who stumble onto this note while looking for a … Read more

404 Not Found The requested URL was not found on this server

In Ubuntu I did not found httpd.conf, It may not exit longer now. Edit in apache2.conf file working for me. cd /etc/apache2 sudo gedit apache2.conf Here in apache2.conf change <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> to <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>

mod_deflate vs mod_gzip

Both these modules do the same thing: add gzip compression on the fly. The one you should use these days is mod_deflate – it is the more modern and recommended one and is distributed with Apache. mod_gzip was an older third-party implementation and there is no good reason to use it anymore. Don’t be fooled … Read more

Redirect ALL requests under a domain to static page [closed]

I actually ended up finding the answer on ServerFault: https://serverfault.com/questions/32513/url-redirect-to-another-page-on-the-same-site “This example will 302 redirect all URLs to “/underconstruction.html”: RewriteEngine On RewriteCond %{REQUEST_URI} !=/underconstruction.html RewriteRule ^ /underconstruction.html [R=302] (which translates as “If URI is not /underconstruction.html, redirect to /underconstruction.html”)” – Tommeh

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)