Question

How can i visit my site in shared hosting with domain name not propagated?

Posted February 14, 2017 2.2k views
NginxDigitalOceanUbuntu 16.04

I am migrating my site from one hosting to another. I have imported the site and data, now i just want to check if my site is working before I add the nameservers to the hosting.
I am using Vestacp as control panel and nginx as a server. I am also using more than one domains on single ip address. So I cannot use ip address to access the website. I could have used temporary urls if it would have been the case of apache but its not so, please can anyone help.
Thank you in advance.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
4 answers

Edit the hosts file of the computer you want to access the site from.

How should i do this, could you please help me out?

Windows: Browse to C:\Windows\System32\Drivers\etc and open the hosts file.
Mac: Open Terminal -> Type: su (login with your account) -> Type: nano /private/etc/hosts

On both systems add the follow line:
serveripadres www.domain.com

Example:
170.149.172.130 www.domain.com

Windows flush dns: open cmd -> type: ipconfig /flushdns
Mac (sierra) flush dns: Open Terminal -> Type: sudo killall -HUP mDNSResponder -> Confirm with password

Done!

Submit an Answer