I am using nginx, until now I was running my php applications on /usr/share/nginx/html which is the default document root when nginx is installed on centOS and like systems.
Now I had to create server blocks (or virtual hosts) to run another application, followed this tutorial (https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-14-04-lts) and ended up creating my application in /var/www/html.
On this process, as the tutorial states to edit etc/hosts to your public IP, this made another application run that is deployed on my LAN. I wanted it to run on my machine only, so I changed it to my local IP and made the following entry to hosts
192.168.0.38 dev.mysite.com www.dev.mysite.com
Strangely, just after that I noticed my hostname had changed to
muUsername@dev instead of @localhost before
- Please tell me why it happened and how to change it back.
- Now the application runs when I access localhost in the browser, but not when I access dev.mysite.com, How to fix that?
- On accessing www.dev.mysite.com I get my old application at the old webroot (uss/share/nginx/html) Why is this happening and how to fix this?
Need any more information, please comment.