Category: Apache

All about Apache security!

Apache, Hardening

Apache Web Server Hardening & Security Script

Tested on Debian 9.x https://github.com/maldevel/blue-team Become root sudo su -sudo su – Hide Apache2 version echo "ServerSignature Off" >> /etc/apache2/apache2.conf echo "ServerTokens Prod" >> /etc/apache2/apache2.confecho "ServerSignature Off" >> /etc/apache2/apache2.conf echo "ServerTokens Prod" >> /etc/apache2/apache2.conf Remove ETags echo "FileETag None" >> /etc/apache2/apache2.confecho "FileETag None" >> /etc/apache2/apache2.conf Disable Directory Browsing a2dismod -f autoindexa2dismod -f autoindex Remove default …

Apache, Debian

Apache web server SSL authentication

Mutual authentication or two-way authentication refers to two parties authenticating each other at the same time, being a default mode of authentication in some protocols (IKE, SSH) and optional in others (TLS). By default the TLS protocol only proves the identity of the server to the client using X.509 certificate and the authentication of the …

Apache, Linux, MySQL, PHP, Ubuntu Server

Install LAMP stack on Ubuntu 16.04

Update system sudo apt-get update && sudo apt-get dist-upgradesudo apt-get update && sudo apt-get dist-upgrade Install Apache sudo apt-get install apache2sudo apt-get install apache2 Install MySQL sudo apt-get install mysql-serversudo apt-get install mysql-server Install PHP sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql php-mbstring php-gettextsudo apt-get install php libapache2-mod-php php-mcrypt php-mysql php-mbstring php-gettext Install PHPMyAdmin sudo …

Apache, XAMPP

Change Apache Ports in XAMPP

Change port for Apache 1. Open x:xamppapacheconfhttpd.conf file for edit. 2. Find Listen 80 and change it to Listen 8081. 3. Find ServerName localhost:80 and change it to ServerName localhost:8081. 4. Save the file. 5. Restart Apache.   Change port for SSL 1. Open x:xamppapacheconfextrahttpd-ssl.conf file for edit. 2. Find Listen 443 and change it …

Apache, PHP, Programming

Set PHP configuration options in Apache using directives

Apache directives to change the PHP configuration: php_value name value Sets the value of the specified directive. php_flag name on|off Sets a boolean configuration directive. php_admin_value name value Sets the value of the specified directive. This can not be used in .htaccess files. php_admin_flag name on|off Used to set a boolean configuration directive. This can …

Apache, MySQL, Programming, Ubuntu

Install LAMP on Ubuntu 11.10

Let’s see how we can install LAMP – Linux, Apache, MySQL & PHP on Ubuntu 11.10! ¬†Install Apache Open terminal and execute the following command: sudo apt-get install apache2sudo apt-get install apache2   Install MySQL Open terminal and execute the following command: sudo apt-get install mysql-serversudo apt-get install mysql-server   Install PHP Open terminal and …

Apache, Linux

Securing Apache Part 1

The following tips are things you can do to make your apache server more secure. Before you begin to follow the tips below, locate your apache’s configuration files first. Common places for apache’s configuration files are: /etc/apache2/apache2.conf, /etc/apache2/httpd.conf and /etc/apache2/sites-enabled/000-default. Before you make any changes, MAKE BACKUP COPIES OF YOUR FILES. Here we go: 1. …

Apache, Linux

Retrieve useful information from Apache logs

Common locations where you can find Apache logs are /var/log/apache2 and /var/log/httpd/. You can extract valuable information from your apache logs. Here are some useful examples! Extract unique IP addresses: cat /var/log/apache2/access.log | awk ‘{print $1}’ | sort | uniqcat /var/log/apache2/access.log | awk ‘{print $1}’ | sort | uniq   Extract unique IP addresses with …