Category: Server

.htaccess redirect not working apache

1.Configure apache mod_rewrite,run in terminal a2enmod rewrite 2. add the following code to /etc/apache2/sites-available/default DocumentRoot /var/www <Directory /> Options FollowSymLinks  AllowOverride All </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> 3.Restart apache /etc/init.d/apache2 restart    

how to find and kill a process using particular port

Use the following command for stop a process using port 80 .This example is based on Ubuntu Linux operating system. Commands need to run in terminal sudo netstat -lpn |grep :80 tcp6       0      0 :::80                   :::* LISTEN      1185/apache2 sudo kill 1185