AdamRDIR
08-26-2001, 04:27 PM
This might seem like a dumb question, but truth be told I have no idea. Can you enable wildcards on a RaQ 4i server?
![]() | View Full Version : wildcards AdamRDIR 08-26-2001, 04:27 PM This might seem like a dumb question, but truth be told I have no idea. Can you enable wildcards on a RaQ 4i server? Chicken 08-26-2001, 04:56 PM Yes, generally in the form of: * IN A xxx.xxx.xxx.xxx (x's are IP#) Marty 08-26-2001, 05:12 PM I have heard people discuss this before, but could somebody give me some examples of where this might be useful? Thanks. AdamRDIR 08-26-2001, 05:38 PM It's usefull cause I wanna run my own subdomain redirection service for my friends, like www.******** and wasn't sure if I would beable to do it on a RaQ, and i'm still not sure. Chicken, I know you can have subdomains on raq's, but can you do what I want to do on it? (allow users to sign up for a subdomain for free and have it instantly avaiable, not subdomain dns) jaime 08-26-2001, 06:02 PM Hi, Yes, you can provide this service in any virtual site you have on your Raq. Is as easy as changing a line in httpd.conf on any virtual site you want to enable wildcards. Then configure properly yous subdomain redirection script and shoul work. In httpd.conf, under any virtual site, search for the line: ServerAlias yourvirtualsitedomain.com and add an * : ServerAlias *yourvirtualsitedomain.com Restart apache and you have wildcards enabled for that virtual site. I have 2 subdomain services running in my raq3. Sure it works great !!! AdamRDIR 08-26-2001, 07:22 PM Thanks alot jaime, appreciate the help :) Adam yesyes 08-28-2001, 06:23 PM didn't you have to set the RewriteEngine to off in httpd.conf for the particular virtual site ? It will rewrite the URL to www.domainname.tld , instead of redirecting to right directory for subdomain.domainname.tld Chicken 08-28-2001, 08:35 PM If you have an entry for the subdomain, it won't just rewrite the URL to www.domainname.tld. Yes, this has to be set up, but you can't expect it to guess now can ya' ? :D iplexx 08-29-2001, 02:31 AM I'm using a slighty different approach: - add any domain with dedicated ip, like myredirector.mydomain.com - disable mod_rewrite stuff in httpd.conf for this vsite - now just add dns stuff for all domains (with dns wildcard enabled) that should use the redirection service with that one dedicated IP a simple PHP script takes the subdomain.domainname requested, querys mysql db and does a header Location... advantages: - you can add any domain without modifying httpd.conf each time - redirects are avaibly immediatly after dns works and subdomain.domain is added to mysql db disadvantages: - requires dedicated IP sample sites: - forum.twinduro.at, www.setcard.cc problems: - cannot redirect path & filename (like anyhost.anydomain.tld/any/path/to/file) because I'm not able to do the mod_rewrite to redirect any request to index.php?any/path/to/file - maybe anyone can help on this? jaime 08-29-2001, 03:30 AM On my raq3 and 4 i had to turn off Rewrite Engine to make wildcards work. In httpd.conf, under the particular virtualsite you want to enable wildcards, look for: RewriteEngine on ---> and change it to off or just comment Rewrite Engine lines : #RewriteEngine on #RewriteCond %{HTTP_HOST} !^XXX.XXX.XXX.XX(:80)?$ #RewriteCond %{HTTP_HOST} !^www.myvirtualsitedomain.com(:80)?$ #RewriteRule ^/(.*) http://www.myvirtualsitedomain.com/$1 [L,R] #RewriteOptions inherit yesyes 08-29-2001, 05:14 AM Okay the wildcards will work, but the siteadmin isn't working anymore if you set the RewriteEngine to Off Chicken 08-29-2001, 09:08 PM I'm not sure if you can leave it to 'on' and just comment out the particular lines that apply to this situation? jaime 08-30-2001, 08:10 AM Hi, That's right. Disabling or commenting the Rewrite Engine options disables Siteadmin (cobalt panel) for that particular virtualsite. When trying to access http://www.thatvirtualsite.com/siteadmin goes to a File not found page. I do not use the virtualsite /siteadmin because I do not give service to 3rd users. I just host my own websites not giving accounts to anybody. I don't mind disabling my virtualsites control panel, because I can manage them through the main Cobalt Panel. I have not had any problem disabling the Rewrite engine. In three of my virtualsites I run subdomain forwarding via a PHP and MYSQL script without any problem. yesyes 08-31-2001, 09:29 AM Do you guys know if mod_rewrite is taking a lot of performance when I offer unlimited subdomains to my customers ? So mod_rewrite will be lot used by the servers. Thanks. |