Jump to content

Attempting to install LAMP in Ubuntu 14.10, get 404 when attempting to access http://localhost/phptest.php, please advise.

Go to solution Solved by Wtalk2,

Whelp, I'm an idiot. I was adding a . onto the link I was searching for. Thanks for your help wtalk.

Haha, no problem glad I could help you :)

After installing LAMP via tasksel, I'm able to access the "It works" test page at http://localhost/ however after creating phptest.php in var/www, I get a 404 when trying to access http://localhost/phptest.php. Any help would be appreciated.

 

My www directory:

bartosik@bartosik-ThinkPad-X131e:/$ cd var/www
bartosik@bartosik-ThinkPad-X131e:/var/www$ ls -l
total 12
drwxr-xr-x 2 root root 4096 Dec 13 20:34 html
-rw-r--r-- 1 root root   22 Dec 13 20:45 phptest.php
-rw-r--r-- 1 root root   22 Dec 13 20:36 phptest.php~
bartosik@bartosik-ThinkPad-X131e:/var/www$

 

The contents of phptest.php:

 

<?php

phpinfo();

?>

Link to comment
Share on other sites

Link to post
Share on other sites

Try moving the phptest.php to /var/www/html :)

My Current Build: 

Intel i5 3570K @ 4.4GHz 1.11V, Cooler Master Hyper 212 EVO, Asrock Z77 Extreme4, Corsair Vengeance 8GB 1600MHz, Samsung 840 EVO 250GB, Asus GTX 760 DCII Overclocked, Corsair CX600M

Link to comment
Share on other sites

Link to post
Share on other sites

 

Try moving the phptest.php to /var/www/html :)

No dice.

 

My html directory: after moving the file:

bartosik@bartosik-ThinkPad-X131e:/var/www/html$ ls -l

total 16

-rw-r--r-- 1 root root 11510 Dec 13 20:34 index.html

-rw-r--r-- 1 root root    22 Dec 13 20:45 phptest.php

bartosik@bartosik-ThinkPad-X131e:/var/www/html$

Link to comment
Share on other sites

Link to post
Share on other sites

Try running "sudo chmod -R 775 /var/www/html"??

My Current Build: 

Intel i5 3570K @ 4.4GHz 1.11V, Cooler Master Hyper 212 EVO, Asrock Z77 Extreme4, Corsair Vengeance 8GB 1600MHz, Samsung 840 EVO 250GB, Asus GTX 760 DCII Overclocked, Corsair CX600M

Link to comment
Share on other sites

Link to post
Share on other sites

Whelp, I'm an idiot. I was adding a . onto the link I was searching for. Thanks for your help wtalk.

Link to comment
Share on other sites

Link to post
Share on other sites

Whelp, I'm an idiot. I was adding a . onto the link I was searching for. Thanks for your help wtalk.

Haha, no problem glad I could help you :)

My Current Build: 

Intel i5 3570K @ 4.4GHz 1.11V, Cooler Master Hyper 212 EVO, Asrock Z77 Extreme4, Corsair Vengeance 8GB 1600MHz, Samsung 840 EVO 250GB, Asus GTX 760 DCII Overclocked, Corsair CX600M

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×