Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Might be that this thread should've been posted under the newbie-section, but I'll give it a go here anyway.
I'm running a computer with slackware 9.0 on our local network (no inet, which is a problem I'll get to another time), meant to serve ftp and web (http/php, etc). I've created a test-account, with its own home-area (home/test1), and I want this user to have an area in this directory that can be used as a public_html-area - accessible from other computers on the network as "slackware-server/test1" through the http-protocol. How do I do this?
I've read several different faq's both on LQ and the respective homepages of the software-distributors - Apache and Slackware - but I haven't found anything regarding the subject. The closest I got was the faq on vhosts on the apache-site, but I'm not sure if that's what I'm looking for.
Any help will be appreciated, thank you.
And btw, the server is already responding through http as a newly installed apache-server, so I know it's working as it should. Installation also includes both MySQL and PHP, which both work perfectly.
well if you just want to share the files,nfs would suffice but I don't think that is what you are looking for ,you should configure your apache server ,set up networking and you're done,if that is what I read from your query!
Correct me if i'm wrong?
How to do that ?
Aren't the apache manuals enough?
Restart apache as necessary (clearly you'll need mod_userdir available but this is on by default). Put some files in /home/test1/public_html. Access http://server/~test1
Originally posted by jharris As already mention nfs/samba might be more suitable for sharing files, however to answer the question.
The samba-part could be interesting (it's a windows-network btw, so I guess it would have to be samba in that case), but I've had difficulties setting up samba before, and I figured it would be faster to just setup and use ftp for this purpose.
Quote:
Create public_html under /home/test1. Check that the following is in your httpd.conf
Restart apache as necessary (clearly you'll need mod_userdir available but this is on by default). Put some files in /home/test1/public_html. Access http://server/~test1
I tried just creating the public_html-folder inside the /home/test1 -folder, but I couldn't browse to the index- and php-files I put in there from the windows-computer. Hopefully it will work when I add the lines you mention above here, unless they are included by default..? I haven't tampered alot with the httpd.conf included with the slackware 9.0 installation, but I'll have to check it out on monday - can't reach the linux-comp from here, as it's located at work.
Thanks for all the help anyway, I'll get back to this as soon as I can
Check the permissions on the files (644), the permissions and the permission on your /home /home/temp1 and /home/temp1/public_html directorys (711, 711, 755 respectively). Also check that Indexes are allowed on your apache server.
Originally posted by jharris Check the permissions on the files (644), the permissions and the permission on your /home /home/temp1 and /home/temp1/public_html directorys (711, 711, 755 respectively). Also check that Indexes are allowed on your apache server.
Now I have a home-dir called test1, that contains the public_html-subdir, with an index and a phpinfo-file.
I'm not sure about how to set permissions and stuff, so it would be great if you could just give me some insight in to how it's done (chmod / chown ?)
The settings in the httpd.conf seems alright, although I'm not sure about the part on allowing indexes either.
Originally posted by ignavus I'm not sure about how to set permissions and stuff, so it would be great if you could just give me some insight in to how it's done (chmod / chown ?)
Yeah thats right, chmod. So something like chmod 755 /home would allow the owner of /home (hopefully root!) to read write or execute the directory and everyone else to just read and execute. Have a read of the following for an explination of file permissions http://math.bnu.edu.cn/Ebook/OR_Prac...y/ch05_01.html
Quote:
Originally posted by ignavus The settings in the httpd.conf seems alright, although I'm not sure about the part on allowing indexes either.
If you look in your httpd.conf file you'll seen lines (typically with a <Directory ..></Directory> block) that say things like
Code:
Options FollowSymLinks Indexes
The indexes option means that if you went to http://someServer/someDir/ and the someDir directory didn't contain an index.html file then the Apache server will return a listing of the contents of the directory. If this option wasn't present then the Apache server would tell you that you didn't not have permissions to view the directory.
Originally posted by jharris That make things a little clearer?
Absolutely, and thanks for the useful info
Somehow I managed to make the test1-page work as well, but I'm not sure how I did it. Might be that it had something to do with the permissions, but it seems okay now.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.