I have setup my Drupal using the Docker and accessing my sites through ip . But now i want to map docker IP address to some domain name in my local machine . can anyone please help me. something like this: Ex : http://192.160.168.3 to http://mysites
Asked
Active
Viewed 183 times
-1
-
What registrar was your domain purchased through? – GrumpyCrouton Oct 24 '17 at 12:41
-
I want this in my local machine. – shrikant Oct 24 '17 at 12:42
-
That's fine, but you have to register a domain for that to work. – GrumpyCrouton Oct 24 '17 at 12:44
-
yes you are right , still i have not registered a domain. first i want this in my local env ,and then i will go for domain registration. – shrikant Oct 24 '17 at 12:48
-
You can't map a domain that you don't own to your local website. For now, you will have to connect to your site via your IP or localhost. – GrumpyCrouton Oct 24 '17 at 12:49
-
For local connection only, you can modify your [hosts file.](https://stackoverflow.com/questions/3266483/editing-hosts-file-to-redirect-url) I.e. 127.0.0.1 -> google.com. When you go to google.com it gos to 127.0.0.1 – IsThisJavascript Oct 24 '17 at 12:50
1 Answers
0
Create the local host name as
sudo echo "127.0.0.1 mysite.local" >> /etc/hosts
Now you can redirect to your application with mysite.local

Jinna Balu
- 6,747
- 38
- 47