# The Ubuntu Forum Community > Ubuntu Official Flavours Support > New to Ubuntu > [SOLVED] 404 not found when trying to access http://localhost/info.php after setting up LAMP

## thirdnipple

I have tried to install Apache, mySQL, and PHP on Ubuntu 14.04.  I can access local host in my browser and I get the default Apache page, which say "It Works!", but when I try to go to http://localhost/info.php I get the 404 error:

*Not Found*

The requested URL /info.php was not found on this server.
Apache/2.4.7 (Ubuntu) Server at localhost Port 80


this is what's in my info.php file:



```

<html><head><title>PHP Test</title></head><body><?php phpinfo(); ?></body></html>

```

Any help would be appreciated.

----------


## alket

Where did you put that file ? Did you change DocumentRoot ?

----------


## thirdnipple

The file is in /var/www/

I have not changed DocumentRoot.  How would I do that?

----------


## Doug S

The default location for DocumentRoot is now /var/www/html
You can change it in /etc/apache2/sites-available/000-default.conf

----------


## newbie2244

You embedded php code in an <html> file. Strip the <html> tags and just leave the phpinfo()  enclosed in the php tags. Assuming that your path to the location of the file is correct, it should execute your php function. Keep the same file name, with ".php" ending.

----------


## thirdnipple

You guys are awesome!

I modified the file to remove the <html> tags and moved the file to the html folder rather than changing the DocumentRoot and the page came up properly.  Thanks again for all of the help!!!

----------


## Doug S

> You embedded php code in an <html> file. Strip the <html> tags and just leave the phpinfo()  enclosed in the php tags. Assuming that your path to the location of the file is correct, it should execute your php function. Keep the same file name, with ".php" ending.


Huh?? That works fine. Try it. Both ways work fine.

@thirdnipple: Glad you got it working.

----------

