Where's the users web directory?
Hi people, I'm a mac user using Yellowdog linux. Since using Mac OSX from the beginning, I understand how a webserver works and I've been using PHP and MySQL for a few years too. Going into linux from MacOSX is proving to be a bit challenging. I can't get my head around where the users store their web files and what is the URL to point to each users web directory.
Any help would be gratefully appreciated. |
Hi AppleMan!
Welcome to LinuxQuestions.org. I'm not familiar with Mac's, nor I understood your questions very well :). But the default index.html is usually located at /var/www. When you point your browser to http://your_ip_address or http://localhost/ if apache is running, index.html will be displayed. Apache configuration file is usually located at /etc/apache/httpd.conf. Editing that file you can, for example, enable php. Hope I did not go to far away from your original questions. Good luck! |
try /var/www/html/ this is the web server directory
if it is not available check http://localhost/ and if nothing comes out then u have to install the apache web server i hope this helps |
Thanks for your reply MegaMan.
I know I was confusing, but that's cos I am confused:confused: lol! Ok, so web files are store in /var/www/, and does that go for each user e.g. /var/www/user1/ or /var/www/user2/ etc.? I take it that each users web directory has to be manually created? |
Right, I gone to /var/www/html and yes, I can access the index.html and other stuff here. But this is the directory for the localhost. What I'm after is a way of other users logging on to linux and creating their own user directory and then they can start serving their own pages.
|
Sorry for being as clear as mud:confused: :cry:
|
Good question AppleMan!
I've a few pages on my "server" (very silly ones) and all of them are storaged in different folder as you've described above (localhost/page1, localhost/page2). I think it's only root who can create pages for security reasons. If you wish your users to be able to great accounts remotely, maybe that could be done with an ftp server(?)... Just a guess, since I never needed to do that :) |
Quote:
|
That should be also possible with Linux I believe. Sounds more like an Apache configuration then OS related, but I could be wrong... since I am wrong most of the time :)
|
If on mac, users view their page by 127.0.0.1/user name, then try doing something like this:
Log in as root. Create directories in the webroot (/var/www/html) to match all of the users, such as: mkdir /var/www/html/user1 mkdir /var/www/html/user2 Then, create shortcuts to the folders in the users home directory (/home/user1) so they can access thier folders easier. Use chmod (or chgroup, Im not quite sure) to allow permit the users to view their respective directories. Good Luck! edit: I think you need to use chgroup. Try here for help with chgroup: http://nscp.upenn.edu/aix4.3html/cmd...s1/chgroup.htm |
All times are GMT -5. The time now is 05:13 PM. |