Access websites without IP

Started by shardie, March 12, 2020, 03:11:22 PM

Previous topic - Next topic

shardie

I have installed the latest CentOS and CWP and created a package etc etc.... Once I have created an account with a domain is there a was to access the website using the domain name instead of the IP?

IP: 192.168.8.1
Account Name : testdomain
Domain : testdomain.com

Access from browser: http://192.168.8.1/~testdomain
THIS IS THE WAY IS ACCESS THE SITE but...

http://testdomain.com
THIS IS HOW I WANT TO ACCESS THE SITE

Is there a configuration to access the sites without using the ip all the time? Also this is for LOCAL SERVER that does not have internet access.

ejsolutions

Simple. Add the domain name & IP to your hosts file.
/etc/hosts for enlightened Linux users; Google it, for other end lusers. :-p

shardie

Quote from: ejsolutions on March 12, 2020, 04:36:23 PM
Simple. Add the domain name & IP to your hosts file.
/etc/hosts for enlightened Linux users; Google it, for other end lusers. :-p

?? Spent hours googling.... Which host file and where? is this done inside CWP? not everyone is a Linux expert.

ejsolutions

Quote from: shardie on March 12, 2020, 04:42:38 PM
Quote from: ejsolutions on March 12, 2020, 04:36:23 PM
Simple. Add the domain name & IP to your hosts file.
/etc/hosts for enlightened Linux users; Google it, for other end lusers. :-p

?? Spent hours googling.... Which host file and where? is this done inside CWP? not everyone is a Linux expert.
Must be a Windoze luser! You need to edit it on the machine that you accessing FROM.
LMGTFY
https://www.google.com/search?q=windows+hosts+file

shardie

Assumptions is the mother of all erupts.... No im NOT a Windows user, Im a Mac user of 20years. I do know about editing a host file. This is stupid, because it means that every Mac that accesses the server has to have the host file edited !!!

If you don't plan on being helpful to people and trying to be sarcastic - I suggest you don't answer at all.

Sandeep

#5
hi there are several browser extensions which you can achieve, preview of domain without changing the real dns
chrome ext :
https://chrome.google.com/webstore/detail/host-switch-plus/bopepoejgapmihklfepohbilpkcdoaeo?hl=en  - I personally use it :)
https://chrome.google.com/webstore/detail/livehosts/hdpoplemgeaioijkmoebnnjcilfjnjdi?hl=en