These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Give Users A Website? on the new forum.
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
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
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
Okay, how bout this... has anybody gotten that "Automatic virtual host" thing to work?
It breaks my box.
<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 ==>> Servers ==>> Apache Webserver ==>> Configure Apache Modules
The link given earlier provides important considerations however, though I don't find an "Automatically create alias domain option" anywhere in my current Virtualmin GPL setup.
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 "Regexp URL redirects" 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
<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!