Showing posts with label apache. Show all posts
Showing posts with label apache. Show all posts

Monday 27 August 2012

Install XAMPP 1.8 From PPA In Ubuntu

Since apache friends has released the v. 1.8 of XAMPP for linux and windows, its important you guys upgrade your XAMPP. In this post, you will find the instructions to install XAMPP 1.8 from PPA.

The most important updates of v. 1.8.0 of XAMPP are: Apache 2.4.2, MySQL 5.5.25a, PHP 5.4.4, and phpMyAdmin 3.5.1. Since the software components are updated, I strongly recommend to upgrade your XAMPP.
All you have to do is follow the following steps in order:

sudo add-apt-repository ppa:upubuntu-com/xampp
sudo apt-get update
sudo apt-get install xampp

Alternatively, you can download the tar file for XAMPP from Apache Friends and follow their instructions to install XAMPP 1.8.0. In case you're looking for upgrading your previous XAMPP installation, be sure to follow this How To.

I hope this helps :)


Saturday 16 June 2012

IP Address Based Restriction Using Htaccess File

Sometimes you need to restrict access to files in your webserver to certain IP address or IP range only. In such case, you can apply a simple .htaccess rule and this post provides an information on how to make IP based restriction Using .htaccess.

First, be sure to enable use of htaccess in apache in your distro.

An example of .htaccess file that will block requests from all IP addresses but the subnet of is as below:

<limit GET>
order deny,allow
deny from all
allow from 192.168

Similarly, an example of .htaccess file that will allow requests from all IP addresses but the subnet of is as below:

<limit GET>
order allow,deny
allow from all
deny from 192.168

You can also specify the individual IP addresses instead of the entire subnet according to your need. Also, note that there should be no space after the comma between allow,deny.

Once you create the .htaccess file, make sure you've provided proper permission to it.

samar@Techgaun:/var/www/samar$ chmod 0644 .htaccess

Once you have made the .htaccess file and provided the proper permission, you might need to restart the apache server(but per directory .htaccess does not require reloading the apache in most cases) so that new configurations will show an effect.

samar@Techgaun:/var/www/samar$ sudo service apache2 reload

I hope this comes handy :)