LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache question (https://www.linuxquestions.org/questions/linux-software-2/apache-question-47090/)

plisken 02-25-2003 02:21 PM

Apache question
 
Hi there, I would like to be able to host a couple of different sites on my RH7 machine. I have apache running, and can access the pages located at /var/www

But I would like to have a couple of different sites running on that one machine. What I tried to do was set it up so that I could have indevidual sites for each user, then what I would do is simply create users for the different sites such as:

www.mywebsite.com/~user1
www.mywebsite.com/~user2

But when I do this and change the permissions of the new users home directories accoridingly, it soes not work as planned, as I find that I have to add an actual filename to the end of the address ie. index.htm

Also, as I have a fixed IP address, is it then possible to have different domains pointed to my machine, yet have them show different web pages?

All comments appreciated...

Crashed_Again 02-25-2003 02:40 PM

This is the section in httpd.conf that deals with users web directories.

<IfModule mod_userdir.c>
#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
#UserDir "disable"

#
# To enable requests to /~user/ to serve the user's public_html
# directory, use this directive instead of "UserDir disable":
#
UserDir public_html

</IfModule>

As you can see the default directory for users personal web space is public_html. From your post I can not understand if you can not get the users web directories to work at all or if you can when you add a file to there directories. I'm pretty sure you must add a file to the public_html directory in order for it to work. If you try to access www.domain.com/~user1 and there are no files in the directory then it will return and error because you have not specified a file to view. Apache thinks you a just trying to browse the directory.

As for hosting multiple sites on one ip you should look into the Virtual Hosts section of your httpd.conf file. I'm not too familiar with how to set it up but I know this is where you start.

Cheers:D


All times are GMT -5. The time now is 05:53 PM.