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?
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?
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)
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.
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/