csmatar
By:
csmatar

404 Error with existing files

June 26, 2013 13.7k views
Hi, I just start a new server and had installed LAMP and Proftpd on UBUNTU, I do some test and work great but now I can't view any page on my server; it always give me the 404 Not Found error even when the files exist on the server. What I've to do?
1 comment
6 Answers
Check Apache's error logs: "tail /var/log/apache2/error.log" - do you see any errors there?
This is the error.log:

[Thu Jun 27 01:00:19 2013] [error] [client 186.6.217.38] File does not exist: /var/www/om.html
[Thu Jun 27 02:03:09 2013] [error] [client 173.199.114.51] script '/var/www/login.php' not found or unable to stat
[Thu Jun 27 02:14:04 2013] [error] [client 173.199.114.51] script '/var/www/service.php' not found or unable to stat
[Thu Jun 27 08:46:57 2013] [error] [client 173.199.114.51] script '/var/www/login.php' not found or unable to stat
[Thu Jun 27 13:57:59 2013] [error] [client 190.166.47.185] File does not exist: /var/www/favicon.ico
[Thu Jun 27 13:58:06 2013] [error] [client 190.166.47.185] File does not exist: /var/www/om.html
[Thu Jun 27 13:58:06 2013] [error] [client 190.166.47.185] File does not exist: /var/www/om.html
[Thu Jun 27 13:58:07 2013] [error] [client 190.166.47.185] File does not exist: /var/www/favicon.ico
[Thu Jun 27 14:22:59 2013] [error] [client 173.199.114.51] script '/var/www/mystery.php' not found or unable to stat
[Thu Jun 27 14:25:40 2013] [error] [client 42.156.138.62] File does not exist: /var/www/users
> "even when the files exist on the server."

Are you sure the files exist? They don't seem to exist in /var/www - please make sure they exist.
Ok, the problem is that Proftpd upload the files to Home>USER and dont let me upload to var>www because the USER I using have no Permission. But how can I add the USER to the same group that owns /var/www and then setting /var/www to group writeable?
Thanks you for help me @Kamal Nasser, I solve the problem with: sudo chown -R username:username /var/www.

DO is great!
Awesome, glad you got it working @csmatar! :]
Have another answer? Share your knowledge.