0

I'm trying to set up the AJAX Push Engine, and I've run into some complications using apache. All I want to do, is whenever I go to some address (e.g. *.example.com), forward it to some other address (e.g. mysite.com).

My httpd-vhosts.conf looks like this...

NameVirtualhost *.example.com

<VirtualHost *.example.com>
    ServerName example.com
    ProxyPass / http://mysite.com/
</VirtualHost>

But if I ping 0.example.com, it doesn't give me the IP address of mysite.com.

What is it that I am missing? If there is an easier way to do this without apache, I'm all ears: I had previously tried to just edit the hosts file, but apparently host files can't contain wildcards.

Thanks!

migrated from superuser.com Jun 30 '11 at 17:33

This question came from our site for computer enthusiasts and power users.

0

if I ping 0.example.com, it doesn't give me the IP address of mysite.com.

The IP address you get for 0.example.com is returned by a DNS server. If you can edit the DNS record for example.com, then you can get that domain name to resolve to the IP of your choice.

If you just need to do some local testing, then you can edit your hosts file, so your machine will resolve any hostname to any IP you like, but doing that only affects your own machine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.