All about Information Technology!

apache

Change Apache Ports in XAMPP

Change port for Apache 1. Open x:\xampp\apache\conf\httpd.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:\xampp\apache\conf\extra\httpd-ssl.conf file for edit. 2. Find Listen 443 and change it [...]

>>

, , , ,

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 [...]

>>

, , , , ,

Get Apache version in Ubuntu

To get Apache version open a terminal and issue the following command: apache2 -v or /usr/sbin/apache2 -v You will get a response similar to this: Server version: Apache/2.2.20 (Ubuntu) Server built: Feb 14 2012 16:35:35

>>

, ,

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 | uniq   Extract unique IP addresses with datetime stamp: cat /var/log/apache2/access.log | awk ‘{print $1 " [...]

>>

, , , , , , , , , , , ,