LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Where's the users web directory? (https://www.linuxquestions.org/questions/linux-newbie-8/wheres-the-users-web-directory-157241/)

AppleMan 03-13-2004 04:30 PM

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.

Mega Man X 03-13-2004 04:35 PM

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!

codino 03-13-2004 04:38 PM

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

AppleMan 03-13-2004 04:39 PM

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?

AppleMan 03-13-2004 04:44 PM

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.

AppleMan 03-13-2004 04:45 PM

Sorry for being as clear as mud:confused: :cry:

Mega Man X 03-13-2004 05:11 PM

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 :)

AppleMan 03-13-2004 05:16 PM

Quote:

Originally posted by Megaman X
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 :)

Right, so I can only have one 'website' running then. hmmmm that's confused me. See, with Mac OSX each user has a 'Sites' directory for them to run their pages off, and they access their place by pointing to 127.0.0.1/username

Mega Man X 03-13-2004 05:24 PM

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 :)

mattp 03-13-2004 06:48 PM

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.