Yousuf Rabee Yousuf Rabee - 3 months ago 10
Linux Question

permission for var/www/html directory

I installed ubuntu server 14.04 then (apache,php and mysql).
I uploaded my website to /var/www/html and nuzip it and linked it to database.
When I request my ip in the browser i get the home page, but when click on any url in the site it returns 404 not found error - not from my website- but from the server.
I searched but problem not solved
this is what i tryed

chmod -R g+w /var/www/html
chown -R $user:$user /var/www/html/
chown -R www-data:www-data /var/www/html/


but non of this works.
any idea ?

Answer

I solved the problem by running this command

a2enmod rewrite

then restart apache server.

Thanks to everybody tryed to help me :)