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