Re: WC on Linux question

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 40343
interpreted = N
texte = dale wrote: > > Would this mod_rewrite work so I could use URLs styled like > www.domain.com/users/nickname/ ? > > You mention this isn't the simplest how difficult is this to implement? > Can I make changes to this using webcat? E.g. Write out a line to its config > file as needed when users make changes?See http://httpd.apache.org/docs/mod/mod_rewrite.htmlfor details, but basically there is a one-time (steep) learning curve to set up a regex to match and rewrite URL's. Once that is done, you shouldn't have to ever touch it again.> > Sure, if you want to be editing your nickname.conf file and restarting > > Apache everytime you make a change. > > I don't believe I would have to restart each time (but of course could be > wrong) I believe I can just set the DNS up using a wildcard so that any > request for a machine name that doesn't match an existing A or CNAME record > would go to a listed IP, then I could use WC to grab the host and display > the proper page. > > But then again, not having used Apache in a virtual domain configuration, I > could be way wrong.Apache reads it's configuration file only on startup (or restart). It is not the DNS that is an issue, it is the Apache side. Basically, you would need to set up as many virtual domains as users and restart Apache each time you did so.> > > John > > Given that I know I will start with approximately 10,000 users and would > need to create these 10,000 folders with matching index.html file in each, > and expect to grow this a great deal over the next few months (and hopefully > continued growth) how would you set this up? > > My preference would be to use the www.domain.com/users/nickname/ style for > now. But could handle going with the http://nickname.domain.com if I had to. > I was hoping to use the latter method down the road as maybe a premium > feature.The former is by far easier to handle than the latter. You can probably get away with the AliasMatch directive rather than the full-blown mod.rewrite: http://httpd.apache.org/docs/mod/mod_alias.html#aliasmatchFor example: AliasMatch /users/(.)(.)(.*)$ /path/to/user/dirs/$1/$2/$1$2$3where the path is the absolute machine path to the files, not the URL. Make sure you read the discussion of Alias as well (the section in particular).But that said, there is no reason you cannot do this in WebCat itself with [grep] and simple display the username as the link[text]userpath=[grep search=(.)(.)(.*)&replace=$1/$2/$1$2$3][nickname][/grep][/text] [nickname]which doesn't involve anything fancy with Apache.HTH -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: WC on Linux question (John Peacock 2001)
  2. Re: WC on Linux question (dale 2001)
  3. Re: WC on Linux question (John Peacock 2001)
  4. Re: WC on Linux question (dale 2001)
  5. Re: WC on Linux question (John Peacock 2001)
  6. Re: WC on Linux question (dale 2001)
  7. Re: WC on Linux question (Jeroen de Wijn 2001)
  8. WC on Linux question (dale 2001)
dale wrote: > > Would this mod_rewrite work so I could use URLs styled like > www.domain.com/users/nickname/ ? > > You mention this isn't the simplest how difficult is this to implement? > Can I make changes to this using webcat? E.g. Write out a line to its config > file as needed when users make changes?See http://httpd.apache.org/docs/mod/mod_rewrite.htmlfor details, but basically there is a one-time (steep) learning curve to set up a regex to match and rewrite URL's. Once that is done, you shouldn't have to ever touch it again.> > Sure, if you want to be editing your nickname.conf file and restarting > > Apache everytime you make a change. > > I don't believe I would have to restart each time (but of course could be > wrong) I believe I can just set the DNS up using a wildcard so that any > request for a machine name that doesn't match an existing A or CNAME record > would go to a listed IP, then I could use WC to grab the host and display > the proper page. > > But then again, not having used Apache in a virtual domain configuration, I > could be way wrong.Apache reads it's configuration file only on startup (or restart). It is not the DNS that is an issue, it is the Apache side. Basically, you would need to set up as many virtual domains as users and restart Apache each time you did so.> > > John > > Given that I know I will start with approximately 10,000 users and would > need to create these 10,000 folders with matching index.html file in each, > and expect to grow this a great deal over the next few months (and hopefully > continued growth) how would you set this up? > > My preference would be to use the www.domain.com/users/nickname/ style for > now. But could handle going with the http://nickname.domain.com if I had to. > I was hoping to use the latter method down the road as maybe a premium > feature.The former is by far easier to handle than the latter. You can probably get away with the AliasMatch directive rather than the full-blown mod.rewrite: http://httpd.apache.org/docs/mod/mod_alias.html#aliasmatchFor example: AliasMatch /users/(.)(.)(.*)$ /path/to/user/dirs/$1/$2/$1$2$3where the path is the absolute machine path to the files, not the URL. Make sure you read the discussion of Alias as well (the section in particular).But that said, there is no reason you cannot do this in WebCat itself with [grep] and simple display the username as the link[text]userpath=[grep search=(.)(.)(.*)&replace=$1/$2/$1$2$3][nickname][/grep][/text] [nickname]which doesn't involve anything fancy with Apache.HTH -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ John Peacock

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Autonumber (2003) Active Server Code... (1998) Suffix or Line? (1999) webcat NT (1998) Return records from another (1997) [isfile] ? (1997) [WebDNA] File Upload Issue (2012) OH MY GOD! (1998) Re:Dumb Question about Docs (1997) Authenticate (1997) Unsubscribe me (2001) Help! WebCat2 bug (1997) Re[4]: Problem with new formvariables (2000) Search/sort in URL Was: GuestBook example (1997) webcat 2.1 new cart fields - please explain more (1998) Misunderstanding?? (1997) [WebDNA] [OT] BBEdit Glossary (2012) Emailer error code? (2001) Image maps/Webcat (1997) Adding insurance to an order, round 2 (2003)