Results 1 to 17 of 17
-
10-18-2002, 06:22 PM #1Registered User
- Join Date
- Aug 2002
- Location
- Utah
- Posts
- 25
How Do i set up Domain Wildcard for Mass Virtual with APACHE?
I have Bind set all up and I have set the Zone like this
* IN A 123.123.123.123
It works and everything. Then I Link the Folder to the user’s directory.
Like this *.domain.com but it does not work.
I use this configuration in the httpd.conf
<VirtualHost 123.123.123.123:80>
VirtualDocumentRoot /var/www/hosts/%0/
</VirtualHost>
Apache just gives me an 404 File Not found whenever I put in *.domain.com in my Internet Browser
(123.123.123.123 is just an example of an IP)
If someone could boost me in the right dorecton i would greatly appreciate.
Thank you
- BradLast edited by Einewton; 10-18-2002 at 08:04 PM.
-
10-18-2002, 10:21 PM #2WHT Addict
- Join Date
- Oct 2001
- Location
- Canada
- Posts
- 157
Pls check mod_rewrite docs.
-
10-18-2002, 10:40 PM #3Web Hosting Guru
- Join Date
- Sep 2002
- Location
- Mansfield
- Posts
- 314
A record IP TTL
www.domain.com 127.127.127.0 900
mail.domain.com 127.127.127.0 900
irc.domain.com 127.127.127.0 900 some.domain.com 127.127.127.0 900
domain.com 127.127.127.0 900
#<VirtualHost _default_:*>
#</VirtualHost>GUI admin tools have no honor. It is a good day to vi.
-
10-19-2002, 03:45 AM #4Junior Guru Wannabe
- Join Date
- Sep 2002
- Location
- LA, CA
- Posts
- 51
Your A record in bind is fine.
httpd.conf should have an entry like this:
<VirtualHost 123.123.123.123:80> # domain.com
DocumentRoot /usr/www/homedir/httpd/htdocs
...
ServerName domain.com
ServerAlias *.domain.com
</VirtualHost>
-
10-19-2002, 04:01 AM #5Web Hosting Master
- Join Date
- Apr 2002
- Location
- Seattle, WA
- Posts
- 955
Originally posted by jlee
Your A record in bind is fine.
httpd.conf should have an entry like this:
<VirtualHost 123.123.123.123:80> # domain.com
DocumentRoot /usr/www/homedir/httpd/htdocs
...
ServerName domain.com
ServerAlias *.domain.com
</VirtualHost>
Are you trying to do something to the effect of...
blah.domain.com going to /var/www/hosts/blah
eck.domain.com going to /var/www/hosts/eck
without having to mess with the apache config all the time? like to automate something? or am i just waaayy off base her?
-
10-19-2002, 12:00 PM #6Registered User
- Join Date
- Aug 2002
- Location
- Utah
- Posts
- 25
without having to mess with the apache config all the time? like to automate something? or am i just waaayy off base her?Last edited by Einewton; 10-19-2002 at 12:06 PM.
-
10-19-2002, 12:55 PM #7Web Hosting Master
- Join Date
- Apr 2002
- Posts
- 565
Have you tried: *.yourdomain.com. IN A 123.123.123.123 (TTL)?
AceWebHosting.Com
Cheap Web Hosting - Multiple Domain Hosting - Reseller Hosting - Virtual Private Server
-
10-19-2002, 01:00 PM #8Registered User
- Join Date
- Aug 2002
- Location
- Utah
- Posts
- 25
My Bind works
But i belive it's apache
Because it gives me a 404 file not found.
i would like to know how to set up apache so that it will reconize that it's not avabile and go to a certian page. and adding the (TTL) did not correct this problem.
Thank you all for your Help. I hope we get this problem resolved so that anyone that wants this simular thing will beable to see how to do it.
-
10-19-2002, 01:32 PM #9Web Hosting Guru
- Join Date
- Sep 2002
- Location
- Mansfield
- Posts
- 314
If you're getting a 404 then the answer is in the error log - that will tell you where it's looking.
GUI admin tools have no honor. It is a good day to vi.
-
10-19-2002, 01:43 PM #10Junior Guru Wannabe
- Join Date
- Sep 2002
- Location
- LA, CA
- Posts
- 51
post all of your apache config from <VirtualHost.... down.
-
10-19-2002, 08:05 PM #11Registered User
- Join Date
- Aug 2002
- Location
- Utah
- Posts
- 25
post all of your apache config from <VirtualHost.... down.
<VirtualHost 123.123.123.123:80>
VirtualDocumentRoot /var/www/hosts/%0/
</VirtualHost>
Well here is the thing. apache looks for whateveryouputin.domain.com
I would like to make apache redirect whateveryouputin.domain.com to a certian page.
I currently have Dynamically Configured Mass Virtual Hosting with APACHE.
This is what i have and i want to keep thoes subdomains pointing there.
name.domain.com --> /home/name/
friend.domain.com --> /home/friend/
I would like to add the feature so i do not have to add subdomains that do not exist.
whateveranyonetypesin.domain.com --> /home/website/
sdjflvodsfoiv.domain.com --> /home/website/
kvoewoie.domain.com --> /home/website/
anything1234.domain.com --> /home/website/
-
10-19-2002, 09:13 PM #12Registered User
- Join Date
- Aug 2002
- Location
- Utah
- Posts
- 25
The only reason it's giving me a 404 is beacuse i dont have the non-existing subdomain link to tell apache where to look when it recives a request for the non existant subdomain.
So my question again is, How do i configure apache to direct a non existing subdomain to a certain area on the server?
-
10-19-2002, 09:33 PM #13Junior Guru Wannabe
- Join Date
- Sep 2002
- Location
- LA, CA
- Posts
- 51
email me your httpd.conf. ill fix it for you. jlee15@pacbell.net
-
10-19-2002, 09:34 PM #14Web Hosting Master
- Join Date
- Apr 2002
- Posts
- 565
I don't know why you have problem with Apache because with my domain i just added: * 1200 IN A 123.123.133.123 to /var/named/mydomain.com.db and then if I try whatever.mydomain.com I'll be served by mydomain.com
AceWebHosting.Com
Cheap Web Hosting - Multiple Domain Hosting - Reseller Hosting - Virtual Private Server
-
10-19-2002, 09:44 PM #15Web Hosting Guru
- Join Date
- Sep 2002
- Location
- Mansfield
- Posts
- 314
Originally posted by Einewton
The only reason it's giving me a 404 is beacuse i dont have the non-existing subdomain link to tell apache where to look when it recives a request for the non existant subdomain.
What Does It Say In The Logs?(tm)GUI admin tools have no honor. It is a good day to vi.
-
10-19-2002, 10:22 PM #16Registered User
- Join Date
- Aug 2002
- Location
- Utah
- Posts
- 25
Here is what My Logs say.
Access Log
--------------
asdfnlkjsjfkskjdfhls.domain.com 123.123.123.123 - - [19/Oct/2002:20:21:59 -0600] "GET / HTTP/1.1" 404 304
combined
Error Log
------------
[Sat Oct 19 20:21:59 2002] [error] [client 123.123.123.123] File does not exist: /var/www/hosts/asdfnlkjsjfkskjdfhls.domain.comLast edited by Einewton; 10-19-2002 at 10:31 PM.
-
10-19-2002, 10:44 PM #17Registered User
- Join Date
- Aug 2002
- Location
- Utah
- Posts
- 25
I don't know why you have problem with Apache because with my domain i just added: * 1200 IN A 123.123.133.123 to /var/named/mydomain.com.db and then if I try whatever.mydomain.com I'll be served by mydomain.com