Apache Security

Apache httpd hardening

Introduction
Apache is one of the most widely-used and popular web servers. It is also one of the most secure web servers available. In this article, I will explain some tips and tricks that will secure your Apache server.

This is a generic ‘quick n dirty’ hardening profile.

 
Hide version:

 

 
Turn Off Server-Side Includes …Read More

Enable Apache UserDir In CentOS 7 / RHEL 7 with SELinux

htaccess https simple redirect

How to redirect HTTP traffic to HTTPS using an .htaccess file

The below code when added to an .htaccess file will automatically redirect any traffic destined for http: to https:

 

This is generic code, no domain or page or subfolder needed in the htaccess code.

HTTP error codes and fixes

Common HTTP Error codes and fixes

Here’s a list with the most common HTTP error codes and solutions for each one.

Error 500: Internal Server Error
Cause 1: Syntax error in .htaccess
Cause 2: Invalid files/directories permissions
Other causes
Errors 502: Bad Gateway & 504: Gateway Timeout

Error 503: Service Unavailable

Error 508: Resource Limit Is Reached

Error 500: Internal Server Error
Error 500

Cause 1: …Read More

Protecting Apache Server From Denial-of-Service Attacks

Protecting Apache Server From Denial-of-Service Attacks

Protecting Apache Server From Denial-of-Service Attacks
Denial-of-Service (DoS) attack is an attempt to make a machine or network resource unavailable to its intended users, such as to temporarily or indefinitely interrupt or suspend services of a host connected to the Internet. A distributed denial-of-service (DDoS) is where the attack source is …Read More

Check / Determine Your Version of Tomcat and Java

Check / Determine Your Version of Tomcat and Java

Determine Your Version of Tomcat using console
Linux:

java -cp lib/catalina.jar org.apache.catalina.util.ServerInfo

Windows:

java.exe -cp lib\catalina.jar org.apache.catalina.util.ServerInfo

 

The output should be similar to this:

java -cp catalina.jar org.apache.catalina.util.ServerInfo
Server version: Apache Tomcat/7.0.42
Server built: Jul 18 2014 10:08:19
Server number: 7.0.42.0
OS Name: Linux
OS Version: 2.6.32-531.29.2.lve1.3.11.1.el6.x86_64
Architecture: amd64
JVM Version: 1.7.0_75-mockbuild_2015_01_22_07_15-b00
JVM Vendor: Oracle Corporation

 

Location of catalina.jar in cPanel server is:

/usr/local/easy/share/java/easy-tomcat7

 
Determine Your Version …Read More

Enable Apache UserDir In CentOS 7 / RHEL 7 with SELinux

Enable Apache UserDir In CentOS 7 / RHEL 7 with SELinux

Lets show you how to install userdir for Centos 7 with Selinux Enabled. In this method all users should have their own public_html directory.

1. Go to root user

2. Create /etc/httpd/conf.d/userdir.conf file

Install apache: 

Enable Apache Userdirs

add:

Restart apache

Then create user’s public_html and assign permissions.

Then here’s the other new things, especially you are using …Read More

CentOS and RHEL 7: Install Linux, Apache, MariaDB, PHP (LAMP)

Install LAMP Server (Apache, MySQL or MariaDB, PHP) On Ubuntu 14.10/14.04/13.10

LAMP is a combination of operating system and open-source software stack. The acronym LAMP comes from the first letters of Linux, Apache HTTP Server, MySQL or MariaDB database, and PHP/Perl/Python.

In this tutorial, we will see how to setup LAMP server on Ubuntu 14.10 system.
Install Apache
Apache is an open-source multi-platform web …Read More

CentOS and RHEL 7: Install Linux, Apache, MariaDB, PHP (LAMP)

CentOS and RHEL 7: Install Linux, Apache, MariaDB, PHP (LAMP)

More about LAMP
LAMP is nothing but a software bundle or a platform consisting of Linux operating system, Apache web-server, MySQL database server and PHP (or Perl/Python)scripting language. The LAMP stack is used for building heavy-duty dynamic web sites entirely out of free and open-source software. In this tutorial, I’m going …Read More