Creating localhost in Linux systems is very easy, you can install apache2, php, mysql separately and then integrate them or you can use ready packages for this(such as LAMP).
What if you have already one localhost under 127.0.0.1 IP and you want to create second one? In this case you don’t need to install additional software. You just need to dublicate some files and configure them. Let’s get started how to do it. Continue reading →
Some new installed Apache servers ignore .htaccess files from any folder. You write into .htaccess some rewrites, but it doesn’t give effect.
Or may be you have installed wordpress, you have changed permalinks from standart to custom one, htaccess is created, but all page and post urls give 404 error. So possibly the solution is like the following:
Edit apache’s conf file:
sudo gedit /etc/apache2/sites-available/default (1. Apache conf address may be different in your server. It depends on server OS, apache configuration. 2. If you are in remote connection and are using SSH, so use vi or nano, not gedit)
In editor you will see such block:
Options Indexes FollowSymLinks MultiViews
Order allow,deny allow from all
Change AllowOverride None line to AllowOverride All. And then save and close editor. Then type in terminal the following:
sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart
That’s all. The problem must be solved.
First posted: e-haci.net