LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-23-2012, 07:05 AM   #1
nothe
LQ Newbie
 
Registered: Sep 2012
Posts: 2

Rep: Reputation: Disabled
Apache 404/403 problem


Hello!

I am new to Linux and gave me than to set up a LAMP server. I'm running CentOS.
I got all LAMP components to function. Then I went on FTP and read my way to vsftp works fine, so I installed it.
What I'm trying to do now is to connect ftp program so I can access any folder I also accessible via http.

Following the instructions, I have created user in the FTP program that allows me to access the folder / home / erik via ftp. It works fine now.
But I can not access it via http. I try to access it via 192.168.1.64 / ~ erik
For a while it was 403 No. permissions. Then when I changed chmod on the home or erik folder (do not know which one triggered faults) I no longer got error 403 but '404 Not found'. Even if I chmod home, erik and public_html to 777, I get '404 Not found' via http.

How can it worth by increasing the rights?
How can I resolve it?

Grateful for answers.
 
Old 09-23-2012, 02:12 PM   #2
_dkode_
LQ Newbie
 
Registered: Sep 2012
Location: kerala
Distribution: debian
Posts: 11

Rep: Reputation: 0
verify apache error log to find the path to file which apache is looking for,
also you can do `su apache` (without quotes) as root and then try cd to the directory, to find whether there exists any issue with file permission for any parent directory.
 
Old 09-23-2012, 03:09 PM   #3
nothe
LQ Newbie
 
Registered: Sep 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Perfect!

Thank you!

It worked. I found out that it looked in the wrong directory. I've added 'Userdir users' which I've found in some tutorial on internet. That was offcourse wrong.

Now I got a new problem.

Just some of my php-files executes. Some just give 404 Not Found. Why?
 
Old 09-23-2012, 06:00 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by nothe View Post
Then when I changed chmod on the home or erik folder (do not know which one triggered faults) I no longer got error 403 but '404 Not found'. Even if I chmod home, erik and public_html to 777, I get '404 Not found' via http.
Regardless of whoever came up with it octal mode 777 is never right, never "the solution". So before you go off blithely wrecking your machine some more at least first change the access permissions back to what they were.
 
Old 09-23-2012, 07:28 PM   #5
youcantoo_linuxguy
LQ Newbie
 
Registered: Oct 2006
Location: Lebanon, OR
Distribution: PCLinuxOS
Posts: 21

Rep: Reputation: 0
Quote:
Originally Posted by nothe View Post
Thank you!

It worked. I found out that it looked in the wrong directory. I've added 'Userdir users' which I've found in some tutorial on internet. That was offcourse wrong.

Now I got a new problem.

Just some of my php-files executes. Some just give 404 Not Found. Why?
If you are getting the 404 error then check the path that you are using. Where ever you are telling the server the .php files is, is incorrect, otherwise Apache would not respond with the 404 error. Also as mention DO NOT change the permissions of the public_html to 777 the correct permissions for the directory is 755 Changing them to 777 just makes your server insecure. There is a reason that the public_html permissions is not set to 777
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Script Kiddies and 403, 404 errors baldur2630 Linux - Security 2 01-08-2012 05:33 PM
[SOLVED] 403 problem: OpenSuse 11 with Apache 2.2 fmr Linux - Newbie 20 10-16-2009 09:07 AM
Yet another Apache index.html 403 problem jerod23 Linux - Server 9 07-13-2009 01:23 PM
I cannot register my site for SEO because i get 403,404 errorrs bevin Linux - Newbie 1 11-14-2008 01:50 AM
.htaccess 403/404.html not working properly Nemie Linux - Server 1 10-28-2008 10:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration