Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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?
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.