Apache

  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 3415
  • Loc: Richland, WA
  • Status: Offline

Post August 2nd, 2008, 12:41 pm

Okay here is my current setup. I'm running Cent OS 5.2 on my server with apache 2.2. I've set up a samba server that is running a domain controller. Right now what I want to do is create a way for apache to run some "virtual machines". Alot of hosting companies do a thing like it.

Basicly, each of the users on the samba server will have a Sites folder. I want this to direct to something like

http://servername/~user/

Anyone know what this might be called?
#define NULL (::rand() % 2)
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post August 2nd, 2008, 12:41 pm

  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Joined: Oct 30, 2004
  • Posts: 2521
  • Loc: /usr/src/MI
  • Status: Offline

Post August 2nd, 2008, 12:48 pm

virtual hosts?
Image
"In a world without walls and fences, who needs Windows and Gates?"
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 3415
  • Loc: Richland, WA
  • Status: Offline

Post August 2nd, 2008, 12:50 pm

Would I just set the server alias to what url I would want?

http://servername/~user

Also off the top of your head do you know if that would support wildcards? I'm looking through the docs too.

For example so I could set it up so any user would get the same virtual host setup?

I believe that mac's have something like this.
#define NULL (::rand() % 2)
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 3415
  • Loc: Richland, WA
  • Status: Offline

Post August 2nd, 2008, 1:58 pm

The ability to direct http request to a users directory required the mod_userdir
#define NULL (::rand() % 2)
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Joined: Oct 30, 2004
  • Posts: 2521
  • Loc: /usr/src/MI
  • Status: Offline

Post August 2nd, 2008, 2:18 pm

so does that solve all of your questions or are the ones in your previous post still lingering?
Image
"In a world without walls and fences, who needs Windows and Gates?"
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • User avatar
  • Joined: May 22, 2004
  • Posts: 3415
  • Loc: Richland, WA
  • Status: Offline

Post August 2nd, 2008, 2:20 pm

Nope that solve it all, well besides the fact that I cant get it towork >< gives me a 403.

However I think it might be SElinux messing with things.
#define NULL (::rand() % 2)
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Joined: Oct 30, 2004
  • Posts: 2521
  • Loc: /usr/src/MI
  • Status: Offline

Post August 2nd, 2008, 4:01 pm

ahh, gotcha.
lol
Image
"In a world without walls and fences, who needs Windows and Gates?"
  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Joined: Jan 23, 2004
  • Posts: 2673
  • Loc: Somewhere outside the box in Sarasota, FL.
  • Status: Offline

Post August 4th, 2008, 4:58 am

mod_userdir.

http://httpd.apache.org/docs/2.0/howto/public_html.html
"It's always a long day, 86,400 won't fit into a short."
  • this213
  • Guru
  • Guru
  • User avatar
  • Joined: Mar 01, 2004
  • Posts: 1242
  • Loc: ./
  • Status: Offline

Post August 15th, 2008, 12:14 pm

the 403 is probably there because apache doesn't have read permissions to the files you're trying to serve. While you may make individual user sites, the same permissions rules still apply.
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post August 15th, 2008, 7:27 pm

For the 403, on my Ubuntu/Debian box; I've found that if I forget to symlink userdir.conf to the mods-enabled folder along with userdir.load I will get the 403 when trying to access the directory and get a directory listing, but not when I access any of the files in that directory.

The contents of userdir.conf contains a handy block of information.

Code: [ Select ]
<IfModule mod_userdir.c>
        UserDir public_html
        UserDir disabled root

        <Directory /home/*/public_html>
                AllowOverride FileInfo AuthConfig Limit
                Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
        </Directory>
</IfModule>
  1. <IfModule mod_userdir.c>
  2.         UserDir public_html
  3.         UserDir disabled root
  4.         <Directory /home/*/public_html>
  5.                 AllowOverride FileInfo AuthConfig Limit
  6.                 Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
  7.         </Directory>
  8. </IfModule>


When I make sure that is loaded with the configuration, I no longer get the 403 errors.
Strong with this one, the sudo is.

Post Information

  • Total Posts in this topic: 10 posts
  • Users browsing this forum: No registered users and 70 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.