1
02 days ago I moved from Linux distro and am now using Elementary OS. I installed Apache, Mysql and PHP manually, in the same way I installed it in the previous distro, but I have problems with Rewrite ( friendly urls ). In the previous distro it worked correctly, but in this distro it is not working. See below the . htaccess, which works correctly:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [QSA,L]
In the terminal I gave the following command:
sudo a2enmod rewrite
I restarted the Apache:
sudo systemctl restart apache2
Then in the file:
/etc/apache2/sites-available/000-default.conf
I included that block:
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
Again I restarted Apache, but still the problem persists, IE, when I click on the site link: talk to us/, It shows that the page was not found. Remember that on the remote server and in the previous distro, it worked correctly and the file speaks to us.php exists.
Try to give a
chmod -R 777
inside your briefcase/var/www/html/
– Alex
Hello Marcelo. I gave permission, but the problem persists.
– user24136
You’ve already messed with the
/etc/apache2/sites-available/000-default.conf
because its configuration seems strange to me?– Alex
I change the
/etc/apache2/apache2.conf
and the/etc/apache2/sites-available/000-default.conf
– Alex
The
/etc/apache2/apache2.conf
did not change. What kind of change should I make in this file?– user24136
I’m sorry, I couldn’t understand about the different setup you were talking about.
– user24136
Tell me if you have solved the problem
– Alex
Hi Marcelo. Nothing... is giving the same problem. I’ll do the following, I’ll reinstall everything, follow the tips you went through and see if the problem will persist.
– user24136