Create the password file: htpasswd -cm /etc/httpd/SITENAME-htpasswd USERNAME Then enter the user’s password twice. Next, update the .htaccess file in the directory that the user would like protected. These are [ … ]
Rewrite Rule Reference
Rewrites Rewrite domain.com to www.domain.com RewriteEngine On RewriteCond %{HTTP_HOST} !^www [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}$1 [R=301,L] Rewrite www.domain.com to domain.com RewriteEngine On RewriteCond %{HTTP_HOST} ^www.domain.com [NC] RewriteRule ^(.*)$ http://domain.com$1 [L,R=301] Rewrite [ … ]
ProxyPass Instead of Varnish
Why use ProxyPass instead of Varnish? Who wants to run a separate daemon and worry about it crashing or have to change port configs? Not Me. So lets get started [ … ]
Protect Apache with fail2ban
Summary The purpose of this article is to configure and tune fail2ban to protect Apache web service.We often see Apache Access logs with hundreds of entries of gets and posts [ … ]
Case-Insensitive URL Requests with Apache
Summary Many users who migrate from Windows environments or from some Shared Webhosting providers will expect their environment to be case-insensitive. There are two ways that we can enable this [ … ]
Basic Apache Troubleshooting
Process Steps Make sure that the system is actually running Apache $ sudo netstat -pltn | grep 80 tcp 0 0 ::: 80 [ … ]
Apache
Installation RHEL / CentOS Apache can be installed via yum as shown below: [root@web01 ~]# yum install httpd httpd-tools mod_ssl When you setup Apache, its common to also setup PHP. [ … ]
Apache Mod_Rewrite
Installation mod_rewrite is a standard Apache module configured by default. Configuration To allow RewriteRules in .htaccess files, you need a minimum of AllowOverride FileInfo in the VirtualHost or Directory config. [ … ]
Apache mod_cache for full-page caching/high performance
Background In Managed Cloud, we often use Varnish or Nginx or Cloud Load Balancers to cache content so that customers with high traffic and/or low code quality can keep their [ … ]
Apache fullstatus with mod_status
Installation Mod_status is a standard Apache module configured by default. It requires either elinks or links, but as elinks is more lightweight, and our requires elinks, we’ll install that. On [ … ]