W
W
wolf-98302015-10-26 21:01:19
Apache HTTP Server
wolf-9830, 2015-10-26 21:01:19

Why is Apache2 giving 404?

I installed Apache2 and php5 and created the info.php file in the /var/www/ directory (I have ubuntu), I wrote <?phpinfo()?> in the file, but when I go to localhost/info.php, I get this error :

Not Found

The requested URL /info.php was not found on this server.

Apache/2.4.7 (Ubuntu) Server at localhost Port 80

how to fix?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Max, 2015-10-26
@wolf-9830

and in ubuntu the root of the server is usually in /var/www/html

V
Vyacheslav, 2015-10-26
@noxiconum

check the permissions of the created file
or run
chown www-data.www-data -R /var/www/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question