{"id":53887,"date":"2021-08-25T11:21:53","date_gmt":"2021-08-25T05:51:53","guid":{"rendered":"https:\/\/www.tothenew.com\/blog\/?p=53887"},"modified":"2022-01-07T03:58:30","modified_gmt":"2022-01-06T22:28:30","slug":"aliasing-localhost-url-in-mac-os","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/aliasing-localhost-url-in-mac-os\/","title":{"rendered":"Aliasing Localhost URL in Mac OS"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Have you ever wanted to use https:\/\/something.i.want.com:8080 instead of the same old boring https:\/\/localhost:8080 ?<\/span><\/p>\n<h4><b>Well here is how you do it on Mac OS.<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">By default, the IP of localhost is 127.0.0.1. &#8216;localhost&#8217; itself is an alias. To make it your own follow the instructions below.<\/span><\/p>\n<h4><b>1. With sudo access vi \/etc\/hosts<\/b><\/h4>\n<p>$sudo vi \/etc\/hosts<\/p>\n<h4><b>2. It would look something like this.<\/b><\/h4>\n<p><span style=\"font-weight: 400;\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-54365 size-full\" src=\"\/blog\/wp-ttn-blog\/uploads\/2021\/08\/Blog20-01-scaled.jpg\" alt=\"\" width=\"2560\" height=\"958\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2021\/08\/Blog20-01-scaled.jpg 2560w, \/blog\/wp-ttn-blog\/uploads\/2021\/08\/Blog20-01-300x112.jpg 300w, \/blog\/wp-ttn-blog\/uploads\/2021\/08\/Blog20-01-1024x383.jpg 1024w, \/blog\/wp-ttn-blog\/uploads\/2021\/08\/Blog20-01-768x287.jpg 768w, \/blog\/wp-ttn-blog\/uploads\/2021\/08\/Blog20-01-1536x575.jpg 1536w, \/blog\/wp-ttn-blog\/uploads\/2021\/08\/Blog20-01-2048x766.jpg 2048w, \/blog\/wp-ttn-blog\/uploads\/2021\/08\/Blog20-01-624x233.jpg 624w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><\/span><\/p>\n<h4><b> Add the aliases in the file like this. Focus on the circled changes only.<\/b><\/h4>\n<p><span style=\"font-weight: 400;\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-54366 size-full\" src=\"\/blog\/wp-ttn-blog\/uploads\/2021\/08\/Blog20-02-scaled.jpg\" alt=\"\" width=\"2560\" height=\"933\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2021\/08\/Blog20-02-scaled.jpg 2560w, \/blog\/wp-ttn-blog\/uploads\/2021\/08\/Blog20-02-300x109.jpg 300w, \/blog\/wp-ttn-blog\/uploads\/2021\/08\/Blog20-02-1024x373.jpg 1024w, \/blog\/wp-ttn-blog\/uploads\/2021\/08\/Blog20-02-768x280.jpg 768w, \/blog\/wp-ttn-blog\/uploads\/2021\/08\/Blog20-02-1536x560.jpg 1536w, \/blog\/wp-ttn-blog\/uploads\/2021\/08\/Blog20-02-2048x747.jpg 2048w, \/blog\/wp-ttn-blog\/uploads\/2021\/08\/Blog20-02-624x228.jpg 624w\" sizes=\"(max-width: 2560px) 100vw, 2560px\" \/><\/span><br \/>\n<span style=\"font-weight: 400;\">Save the file and voila, you are good to go. Share this cool trick with your colleagues and team and follow our blogs where we&#8217;ll talk about something similar for Docker soon.<\/span><\/p>\n<div class=\"ap-custom-wrapper\"><\/div><!--ap-custom-wrapper-->","protected":false},"excerpt":{"rendered":"<p>Have you ever wanted to use https:\/\/something.i.want.com:8080 instead of the same old boring https:\/\/localhost:8080 ? Well here is how you do it on Mac OS. By default, the IP of localhost is 127.0.0.1. &#8216;localhost&#8217; itself is an alias. To make it your own follow the instructions below. 1. With sudo access vi \/etc\/hosts $sudo vi [&hellip;]<\/p>\n","protected":false},"author":1393,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":431},"categories":[1439,7,4684,1185,3038,1994],"tags":[4883],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/53887"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/1393"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=53887"}],"version-history":[{"count":6,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/53887\/revisions"}],"predecessor-version":[{"id":54444,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/53887\/revisions\/54444"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=53887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=53887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=53887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}