Yousuf Rabee Yousuf Rabee - 1 year ago 73
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 Source

I solved the problem by running this command

a2enmod rewrite

then restart apache server.

Thanks to everybody tryed to help me :)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download