LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 02-25-2003, 03:21 PM   #1
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1/13.37/14 RedHat 6.2/7/EL6.5 SuSE 8.2/11.1
Posts: 471

Rep: Reputation: 30
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...
 
Old 02-25-2003, 03:40 PM   #2
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question - (apache?) pylon42 Linux - General 7 03-23-2005 08:55 AM
Apache Question Sideshow Linux - Networking 6 02-13-2004 06:31 PM
another apache question needforspeed Linux - Software 2 09-26-2003 10:24 PM
another apache question peteABK Linux - Software 8 05-27-2003 03:58 AM
apache question davsingl67 Linux - Newbie 1 12-11-2002 03:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration