Monday, April 16, 2018

set virtual host (custom domain) in Nuxt / VueJs template

Hi,
if you are using Nuxt framework and your build url is something like
127.0.0.1/project:3000 or any port  but you want to access through domain like comedymood.com

Then you are in right place.

Follow this steps.

1. Open package.json file 
add this entry.

"config": {
    "nuxt": {
      "host": "0.0.0.0",
  "port": "80"
    }
  }

2. Open HOST file (file:///C:/Windows/System32/drivers/etc/hosts)
add this entry at bottom.


127.0.0.1 comedymood.com

now terminate npm process if running (ctrl+c) and then run again by "npm run dev"
you will get the url like localhost:80


But don't worry.
you open comedymood.com in your favourite browser.   
Thanks.


Wednesday, April 11, 2018

xampp - localhost is working but not 127.0.0.1 in windows

Open C:\xampp\apache\conf\extra\httpd-vhosts.conf

search <VirtualHost *:80> or this line (DocumentRoot "c:/xampp/htdocs/)
replace this with below code.

<VirtualHost 127.0.0.1:80>
DocumentRoot "c:/xampp/htdocs/"
ServerName localhost
<Directory c:/xampp/htdocs/>
Require all granted 
</Directory>
</VirtualHost>

Now Restart xampp and access 127.0.0.1



http://localhost works but 127.0.0.1 does not work in windows 
localhost - Virtual host installation not working
Unable to resolve localhost, 127.0.0.1 or local IP address ...
Localhost working but IP address and 127.0.0.1 but working


127.0.0.1 not working windows 10,  127.0.0.1 not working,  localhost working but ip address not working,  localhost not working,  127.0 0.1 not found, 127.0.0.1 localhost,  localhost not working in windows 7, 127.0 0.1 this site cant be reached