elpddev
elpddev

Reputation: 4484

Refering to subdomain name when using domain ip number

Apologies if this question is not correct.

I have a local development machine with:

  1. a rest server project been accessed by localhost
  2. and an ajax javascript project been accessed by app.localhost.

Both are been served by an Apache server.

I have a deployment VPS with static ip, currently no DNS name. Before I set a domain name, is there a way to access the sub domain with the ip address, so to test the ajax project from outside ?

For example:

Is there a syntax or an option to do that ?

Upvotes: 0

Views: 137

Answers (1)

slash
slash

Reputation: 603

There's a way to do this. Assuming you have two different VirtualHost config as below

<VirtulHost *:80>ServerName main.domain.name...</VirtualHost>

And

<VirtulHost *:80>ServerName sub.domain.name...</VirtualHost>

Put these two entries in a host file of machine on which you are performing testing.

ip of VPS   main.domain.name
ip of VPS   sub.domain.name

Go to your LAN Settings on IE and make sure all options under Automatic Configuration and Proxy Serverare unchecked.

Restart IE and try to access both domains.

Hope that helps!

Upvotes: 1

Related Questions