0

Referring to this question here: Adding subdomain support into lighttpd

I am trying to setup a subdomain on my server. The example provided in the link above works but, the problem is, I still have not bought a domain and, as I am running on a development environment and my IP is dynamic, I have problems in setting it as I need to change the config file every time I change my IP.

Is there any way to set a subdomain without necessarily setting the domain as well?

This question is a good fit for all the people who are running in a development environment with dynamic IP, and need to setup subdomains for their website.

Community
  • 1
  • 1
john smith
  • 565
  • 1
  • 10
  • 20

1 Answers1

1

Why don't you force the dns (on your local machine) by editing your /etc/hosts file ?

#[server ip]   [new domain not bought]
90.90.90.90    subdomain.domain.com

Then, every time you will go on subdomain.domain.com, it will point to 90.90.90.90, which is your server.

j0k
  • 22,600
  • 28
  • 79
  • 90