Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

subdomain "forwarding" for a vhost

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  apache web root directory  
Author Message
Paul

External


Since: Dec 15, 2006
Posts: 25



(Msg. 1) Posted: Fri Jun 08, 2007 2:19 pm
Post subject: subdomain "forwarding" for a vhost
Archived from groups: alt>apache>configuration (more info?)

I have a vhost in the conf file for, say, mydomain.com. I want to have a
subdomain called abc.mydomain.com to automatically go to URL, say,
abc.anotherdomain.com.

How would I do that?

 >> Stay informed about: subdomain "forwarding" for a vhost 
Back to top
Login to vote
shimmyshack

External


Since: Jun 07, 2007
Posts: 70



(Msg. 2) Posted: Fri Jun 08, 2007 2:19 pm
Post subject: Re: subdomain "forwarding" for a vhost [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Jun 8, 7:19 pm, "Paul" <l....DeleteThis@invalid.com> wrote:
> I have a vhost in the conf file for, say, mydomain.com. I want to have a
> subdomain called abc.mydomain.com to automatically go to URL, say,
> abc.anotherdomain.com.
>
> How would I do that?

create a new vhost for abc.mydomain.com
inside the vhost put
<IfModule mod_alias>
RedirectPermanent / http://abc.anotherdomain.com/
#or
# RedirectMatch 301 (.*) http://abc.anotherdomain.com$1
#where 301 sends a permananent redirect, rather than a moved
temporarily [302] status
</IfModule>

 >> Stay informed about: subdomain "forwarding" for a vhost 
Back to top
Login to vote
Paul

External


Since: Dec 15, 2006
Posts: 25



(Msg. 3) Posted: Fri Jun 08, 2007 2:47 pm
Post subject: Re: subdomain "forwarding" for a vhost [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"shimmyshack" <matt.farey.RemoveThis@gmail.com> wrote in message
news:1181327485.794174.141700@e65g2000hsc.googlegroups.com...
> On Jun 8, 7:19 pm, "Paul" <l....RemoveThis@invalid.com> wrote:
>> I have a vhost in the conf file for, say, mydomain.com. I want to have a
>> subdomain called abc.mydomain.com to automatically go to URL, say,
>> abc.anotherdomain.com.
>>
>> How would I do that?
>
> create a new vhost for abc.mydomain.com
> inside the vhost put
> <IfModule mod_alias>
> RedirectPermanent / http://abc.anotherdomain.com/
> #or
> # RedirectMatch 301 (.*) http://abc.anotherdomain.com$1
> #where 301 sends a permananent redirect, rather than a moved
> temporarily [302] status
> </IfModule>

There's nothing for abs to point to so does the vhost for abc.mydomain.com
need a serveralias and doc root, like:

<VirtualHost *:80>
ServerName abc.mydomain.com
ServerAlias abc.mydomain.com
DocumentRoot /var/www/NOWHERE
<IfModule mod_alias>
RedirectPermanent / http://abc.anotherdomain.com/
temporarily [302] status
</IfModule>
</VirtualHost>
 >> Stay informed about: subdomain "forwarding" for a vhost 
Back to top
Login to vote
Paul

External


Since: Dec 15, 2006
Posts: 25



(Msg. 4) Posted: Fri Jun 08, 2007 2:56 pm
Post subject: Re: subdomain "forwarding" for a vhost [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I created a new vhost below:

<VirtualHost *:80>
ServerName abc.mydomain.com
<IfModule mod_alias>
RedirectPermanent / http://abc.anotherdomain.com/
temporarily [302] status
</IfModule>
</VirtualHost>

went to command prompt and :
> apachectl restart

Tried to open the web page, abc.mydomain.com, and it said "Server not found"
and mod_alias is there.

Any ideas?
 >> Stay informed about: subdomain "forwarding" for a vhost 
Back to top
Login to vote
Mark

External


Since: Aug 06, 2006
Posts: 47



(Msg. 5) Posted: Fri Jun 08, 2007 3:41 pm
Post subject: Re: subdomain "forwarding" for a vhost [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Paul" <lof RemoveThis @invalid.com> wrote in news:7Dhai.22466$dy1.16854@bigfe9:

> I created a new vhost below:
>
> <VirtualHost *:80>
> ServerName abc.mydomain.com
> <IfModule mod_alias>
> RedirectPermanent / http://abc.anotherdomain.com/
> temporarily [302] status
> </IfModule>
> </VirtualHost>
>
> went to command prompt and :
>> apachectl restart
>
> Tried to open the web page, abc.mydomain.com, and it said "Server not
> found" and mod_alias is there.
>
> Any ideas?
>
>
>

Yeah...do you have a DNS for abc.mydomain.com?




--

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
 >> Stay informed about: subdomain "forwarding" for a vhost 
Back to top
Login to vote
Paul

External


Since: Dec 15, 2006
Posts: 25



(Msg. 6) Posted: Fri Jun 08, 2007 5:05 pm
Post subject: Re: subdomain "forwarding" for a vhost [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Mark" <mtaylor*@*lrim.com> wrote in message
news:1181335286_44995@sp6iad.superfeed.net...
> "Paul" <lof.DeleteThis@invalid.com> wrote in news:7Dhai.22466$dy1.16854@bigfe9:
>
>> I created a new vhost below:
>>
>> <VirtualHost *:80>
>> ServerName abc.mydomain.com
>> <IfModule mod_alias>
>> RedirectPermanent / http://abc.anotherdomain.com/
>> temporarily [302] status
>> </IfModule>
>> </VirtualHost>
>>
>> went to command prompt and :
>>> apachectl restart
>>
>> Tried to open the web page, abc.mydomain.com, and it said "Server not
>> found" and mod_alias is there.
>>
>> Any ideas?
>>
>>
>>
>
> Yeah...do you have a DNS for abc.mydomain.com?

No, my host only allows DNS sub.domain.tld entries for my main account which
is not one of the ones listed.
 >> Stay informed about: subdomain "forwarding" for a vhost 
Back to top
Login to vote
Mark

External


Since: Aug 06, 2006
Posts: 47



(Msg. 7) Posted: Fri Jun 08, 2007 5:06 pm
Post subject: Re: subdomain "forwarding" for a vhost [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Paul" <lof DeleteThis @invalid.com> wrote in news:Nvjai.22470$dy1.9104@bigfe9:

> "Mark" <mtaylor*@*lrim.com> wrote in message
> news:1181335286_44995@sp6iad.superfeed.net...
>> "Paul" <lof DeleteThis @invalid.com> wrote in news:7Dhai.22466$dy1.16854@bigfe9:
>>
>>> I created a new vhost below:
>>>
>>> <VirtualHost *:80>
>>> ServerName abc.mydomain.com
>>> <IfModule mod_alias>
>>> RedirectPermanent / http://abc.anotherdomain.com/
>>> temporarily [302] status
>>> </IfModule>
>>> </VirtualHost>
>>>
>>> went to command prompt and :
>>>> apachectl restart
>>>
>>> Tried to open the web page, abc.mydomain.com, and it said "Server
>>> not found" and mod_alias is there.
>>>
>>> Any ideas?
>>>
>>>
>>>
>>
>> Yeah...do you have a DNS for abc.mydomain.com?
>
> No, my host only allows DNS sub.domain.tld entries for my main account
> which is not one of the ones listed.
>
>
>

Then you can test it by putting an entry into your client machine's hosts
file, as...

[ip_address] abc.mydomain.com


But, don't expect the rest of the world to see it until you can supply a
DNS entry to abc.mydomain.com




--

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
 >> Stay informed about: subdomain "forwarding" for a vhost 
Back to top
Login to vote
shimmyshack

External


Since: Jun 07, 2007
Posts: 70



(Msg. 8) Posted: Sat Jun 09, 2007 4:48 am
Post subject: Re: subdomain "forwarding" for a vhost [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Jun 8, 7:56 pm, "Paul" <l....RemoveThis@invalid.com> wrote:
> I created a new vhost below:
>
> <VirtualHost *:80>
> ServerName abc.mydomain.com
> <IfModule mod_alias>
> RedirectPermanent /http://abc.anotherdomain.com/
> temporarily [302] status
> </IfModule>
> </VirtualHost>
>
> went to command prompt and :
>
> > apachectl restart
>
> Tried to open the web page, abc.mydomain.com, and it said "Server not found"
> and mod_alias is there.
>
> Any ideas?

temporarily [302] status
should have been commented - it was part of the explanation line but
got wrapped

<VirtualHost *:80>
ServerName abc.mydomain.com
DocumentRoot /var/www/NOWHERE
<IfModule mod_alias>
RedirectPermanent / http://abc.anotherdomain.com/
</IfModule>
</VirtualHost>

you need a DNS entry poiting to that server - so the public can see it
or for just you to test it, you can have a hosts entry pointing
abc.mydomain.com to the server

As you host only allows DNS for sub.domain.tld (which is not one of
the ones listed) it seems to me that any rules you place in the
vhost.conf will only mean anything for clients whose hosts entries you
control. (or if you use a dynamic dns to point to the server IP - I
might be wrong I havent thought that out)
The hosting company might allow you to modify the vhost.conf but the
server will need to be restarted, if they are any good, (at least I
would think this a precaution) thy would parse through your vhost file
and remove anything that doesn't fit with their policies. (if they
machine is shared, you could add rules for domains thate exist on
others accounts, how would the behaviour be predictable in this case)

Sorry if I have repeated anything Mark said.
 >> Stay informed about: subdomain "forwarding" for a vhost 
Back to top
Login to vote
Paul

External


Since: Dec 15, 2006
Posts: 25



(Msg. 9) Posted: Sun Jun 10, 2007 8:43 pm
Post subject: Re: subdomain "forwarding" for a vhost [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"shimmyshack" <matt.farey DeleteThis @gmail.com> wrote in message
news:1181389691.292034.283190@q69g2000hsb.googlegroups.com...
> On Jun 8, 7:56 pm, "Paul" <l... DeleteThis @invalid.com> wrote:
>> I created a new vhost below:
>>
>> <VirtualHost *:80>
>> ServerName abc.mydomain.com
>> <IfModule mod_alias>
>> RedirectPermanent /http://abc.anotherdomain.com/
>> temporarily [302] status
>> </IfModule>
>> </VirtualHost>
>>
>> went to command prompt and :
>>
>> > apachectl restart
>>
>> Tried to open the web page, abc.mydomain.com, and it said "Server not
>> found"
>> and mod_alias is there.
>>
>> Any ideas?
>
> temporarily [302] status
> should have been commented - it was part of the explanation line but
> got wrapped
>
> <VirtualHost *:80>
> ServerName abc.mydomain.com
> DocumentRoot /var/www/NOWHERE
> <IfModule mod_alias>
> RedirectPermanent / http://abc.anotherdomain.com/
> </IfModule>
> </VirtualHost>
>
> you need a DNS entry poiting to that server - so the public can see it
> or for just you to test it, you can have a hosts entry pointing
> abc.mydomain.com to the server
>
> As you host only allows DNS for sub.domain.tld (which is not one of
> the ones listed) it seems to me that any rules you place in the
> vhost.conf will only mean anything for clients whose hosts entries you
> control. (or if you use a dynamic dns to point to the server IP - I
> might be wrong I havent thought that out)
> The hosting company might allow you to modify the vhost.conf but the
> server will need to be restarted, if they are any good, (at least I
> would think this a precaution) thy would parse through your vhost file
> and remove anything that doesn't fit with their policies. (if they
> machine is shared, you could add rules for domains thate exist on
> others accounts, how would the behaviour be predictable in this case)
>
> Sorry if I have repeated anything Mark said.
>

great info - I'll give it a try.
 >> Stay informed about: subdomain "forwarding" for a vhost 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Forwarding SSL - Hi all, We currently have a openssl and apache installation with various secure and non secure sites up and running using a single wild card certificate. We need to forward on one https url directly onto our IIS server without openssl providing the..

does google work better with dns forwarding or 301 redirec.. - can someone please assist me with this issue 2 sites which is beeter for google DNS forwarding or 301 redirector

domain forwarding / apache responding with domain name ins.. - Hi group, trying to figure out what I am doing wrong.. or what is left to do.. situation: got domain with provider a (lets call them godaddy), they forward my domain to my local box (firewall / webserver). domain is called 'mydomain.com' (example)...

Apache port forwarding from HTTPS to HTTP - Hi, I currently have a system that forwards HTTP requests to other ports based on the domain name. IIS listens on one of them and serves web pages, while other applications listen on others and do various other things. It is all working fine, but..

Subdomain - Hello, I run Apache 2 on my home machine. I have a DDNS service provider (ZoneEdit) that associates my dynamic IP address to my domain. What I am wondering is how I can create subdomains? Is that done with Apache? I am looking for something like: ..
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]