The .htaccess file is a configuration file for the Apache web server, that can be used to redirect requests from specific IP addresses to another resources. In this short note i will show how to redirect requests from one or several IP addresses via .htaccess file to a specific web page or another website.
apache
.htaccess – Deny IP & Block IP Range
The .htaccess file is a configuration file for the Apache web server, that can be used to restrict access to a web-site from a specific IP or a range of IP addresses. In this note i will show how to deny access from one or several IP addresses via .htaccess file and how to block […]
mod_wsgi – Find Out The Version
The mod_wsgi is an Apache module that provides a WSGI compliant interface and serves for hosting Python based web applications under Apache (for example Django). To find out which version of mod_wsgi is installed or compiled, it is required to create a simple WSGI application. From the following article you will learn how to create […]
mod_wsgi – ‘Hello World’ Example
The mod_wsgi serves for hosting Python based web applications under Apache. This short article describes how to create a basic WSGI application and run it on Apache using mod_wsgi. Below you would find how to create a virtual host in Apache and publish a simple WSGI application that just prints “Hello World!”.
Apache Modules – List All Enabled (Loaded)
Apache has a lot of modules (or “mods”) that extend its core functionality for special purposes. How to list installed Apache modules – is a common question as it is very often required to check which Apache modules are loaded/enabled. List of installed Apache modules can be found using special option for httpd/apachectl (CentOS, RHEL […]
List All VHosts in Apache
If you have to troubleshoot any Apache issues, it is always a good idea to start with checking of the currently enabled Virtual Hosts. This can be done with the -S option used on the httpd/apache2 or on the apachectl/apache2ctl. -S option shows which ports and which IP addresses or domain names are configured for […]
Redirect Site to Maintenance Page using Apache and HTAccess
In this article you will find how to redirect all traffic and all visitors of your site to a maintenance page during site updates. I’ll show how to create a maintenance page, how to put the site into a maintenance mode and how to bring it back online without restarting Apache. You’ll learn how to […]
Apache Web-Server Installation on CentOS/RHEL
This guide explains how to install Apache Web Server on CentOS/RHEL based systems. Apache Server Installation Execute the following command to install the latest Apache Server from basic CentOS/RHEL repositories: # yum install httpd Set the Apache Server daemon to start at boot. # chkconfig httpd on Basic Apache Configuration Backup the Apache configuration file […]
Moving SSL Certificate from IIS to Apache
This procedure will help you to move or copy your SSL certificate, installed on an IIS server to an Apache server. Step 1: Export IIS certificate into a .PFX file Run mmc.exe Click the ‘Console’ menu and then click ‘Add/Remove Snap-in’. Click the ‘Add’ button and then choose the ‘certificates’ snap-in and click on ‘Add’. […]
HowTo: Install LAMP on CentOS/RHEL
In this guide, I will show you, how to install LAMP (Linux, Apache, MySQL, PHP) – a stack of free, open source software for building a web server for general purpose. 1. Install Apache HTTP Server yum install httpd Backup the apache configuration file ‘httpd.conf’. cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.backup Set the apache service to start at […]