Give Users A Website?

7 posts / 0 new
Last post
#1 Mon, 04/27/2009 - 09:28
mrwilder

Give Users A Website?

I'm sure there must be some instructions around here for giving users their own website... but I can't for the life of me find them

I assume it's a matter of some regexp in the aliases and redirects or document options, but, I was hoping it would already have been discussed... and surely it must have been. In fact, maybe it was me that asked last time. Sorry I'm senile.

Anybody got a link to the instructions or the handy dandy expression?

Thanks, Tony

Mon, 04/27/2009 - 09:34
andreychek

Hmm, I suspect I'm overlooking what you're after here, as giving users a website is normally as simple as creating a Virtual Server.

Perhaps you're referring to giving them a site when they don't have their own domain name -- you want to give them a page, but using the primary domain of the system?

Details on how to do that are described here:

http://www.virtualmin.com/component/option,com_openwiki/Itemid,48/id,fre...

Joe saved the best for last there -- check out option #3 towards the end, where he describes how to setup an alias. That's probably the best way to do that.
-Eric

Mon, 04/27/2009 - 11:31 (Reply to #2)
mrwilder

Yes, unfortunately I want to do things the way Joe don't like.

The instructions given for Automatic Virtual Host break the web service on my box... I remember now... when I follow the instructions, all links anywhere other than the index give me a 404.

I was able to map to phpmyadmin by inserting a Document directory alias:
/php -----> /usr/src/phpmyadmin/

I assume I can do the same for user sites with a Regexp URL redirect. I tried:

^/~(.*)?(/.*)?$ -----> /home/$1/public_html

but my expressions syntax is obviously rusty. To me this seems like it should map correctly, but it doesn't.

Any suggestions to help me map http://www.domain.com/~user to /home/user/public_html? (other than not to do it... hehe)

Thanks,
Tony

Wed, 04/29/2009 - 09:27 (Reply to #3)
mrwilder

Okay, how bout this... has anybody gotten that "Automatic virtual host" thing to work?

It breaks my box.

Fri, 05/01/2009 - 04:25 (Reply to #4)
miner

<div class='quote'>Any suggestions to help me map http://www.domain.com/~user to /home/user/public_html?</div>

In Debian your clue is /etc/apache2/mods-enabled/userdir.conf

Webmin ==&gt;&gt; Servers ==&gt;&gt; Apache Webserver ==&gt;&gt; Configure Apache Modules

The link given earlier provides important considerations however, though I don't find an &quot;Automatically create alias domain option&quot; anywhere in my current Virtualmin GPL setup.

Wed, 05/20/2009 - 17:13 (Reply to #5)
mrwilder

well, I'm using httpd.conf...

The UserDir command already reads

Userdir public_html

but it always gets a 404... which makes sense because the Apache documentation reads that http://www.domain.com/~USERNAME should redirect to

/home/USERNAME/public_html/

not
/home/DOMAIN/homes/USERNAME/public_html/

or perhaps

/homes/USERNAME/public_html/
if it's a relative path, which I don't know.

If I try to edit the settings through webmin with a &quot;Regexp URL redirects&quot; my expression goes into a loop forever... for example, adding these entries and various combinations thereof
^/~([A-Za-z_]+) /home/SomeDomain/homes/$1/public_html
^/~([A-Za-z_]+)/* /home/SomeDomain/homes/$1/public_html/$2
^/~([A-Za-z_]+)/ /home/SomeDomain/homes/$1/public_html/

will make a call to http://SomeDomain.com/~user go to

SomeDomain.com/index.html/index.html/index.html/index.html/index.html/

etc until the browser recognizes the loop and gives up.

I assume that eventually, through trial and error, I'll eventually figure out one of these two methods... but... has anybody got this to work yet?

Thanks for your time all,
Tony

Wed, 05/20/2009 - 17:36 (Reply to #6)
Joe
Joe's picture

<div class='quote'>but it always gets a 404... which makes sense because the Apache documentation reads that http://www.domain.com/~USERNAME should redirect to

/home/USERNAME/public_html/

not
/home/DOMAIN/homes/USERNAME/public_html/

or perhaps

/homes/USERNAME/public_html/
if it's a relative path, which I don't know.</div>

It's normally relative to $HOME.

--

Check out the forum guidelines!

Topic locked