title: In vagrant can not access to the default keystone site with nginx
body: <p>The vagrant server I configure with the following script still serve the default nginx page instead of the default keystone page.
  Here the scripts I use:</p>
  
  <p>The vagrant file:</p>
  
  <pre><code>Vagrant.configure("2") do |config|
    config.vm.box = "centos/7"
    config.vm.network "private_network", ip: "192.168.1.10"
    config.vm.provider "virtualbox" do |vb|
    config.vm.provision "file", source: "mongodb-org-3.2.repo", destination: "~/mongodb-org-3.2.repo"
    config.vm.provision "shell", path: "provision.sh"
  end
  </code></pre>
  
  <p>The provision file:</p>
  
  <pre><code>sudo yum -y update
  sudo hostnamectl set-hostname melanie
  echo "given hostname :"
  hostnamectl status --static
  echo -e "\e[1;34m
  
  ***************************************************
  add host names
  ***************************************************"
  
  sudo cp /etc/hosts /etc/hosts.origin
  echo "192.168.1.10 melanie.misite.com melanie" | sudo tee -a /etc/hosts &gt; /dev/null
  echo -e "\e[1;34mIP, FQDN and Server name setted in /etc/hosts:"
  cat /etc/hosts
  echo -e "\e[1;34m
  
  ***************************************************
  set timezone
  ***************************************************"
  
  sudo timedatectl set-timezone America/Guayaquil
  echo -e "\e[1;34msetted time zone:"
  timedatectl | grep "Time zone"
  echo -e "\e[1;34m
  
  ***************************************************
  add automatic security update
  ***************************************************"
  
  sudo yum -y install yum-cron
  sudo sed -i.bak 's/.*update_cmd =.*/update_cmd = security/' /etc/yum/yum-cron.conf
  sudo sed -i.bak 's/.*apply_updates =.*/apply_updates = yes/' /etc/yum/yum-cron.conf
  sudo sed -n /update_cmd/p /etc/yum/yum-cron.conf
  sudo sed -n /apply_updates/p /etc/yum/yum-cron.conf
  sudo systemctl status yum-cron
  sudo systemctl start yum-cron
  echo -e "\e[1;34m
  
  ***************************************************
  create limited user account
  ***************************************************"
  
  sudo useradd me
  sudo echo me:admin | chpasswd
  echo -e "\e[1;34m
  
  ***************************************************
  SSH Dameon Options
  ***************************************************"
  
  sudo sed -i.bak 's/.*PermitRootLogin.*/PermitRootLogin no/' /etc/ssh/sshd_config
  echo yum-cron.conf modified parameters:
  sudo sed -n /PermitRootLogin/p /etc/ssh/sshd_config
  systemctl restart sshd
  echo -e "\e[1;34m
  
  ***************************************************
  installing fail2ban
  ***************************************************"
  
  
  sleep 15 #put sleep hoping it will help to fail2ban to be installed =&gt; do not work
  sudo yum -y install fail2ban
  sudo yum -y install sendmail
  sudo systemctl start fail2ban
  sudo systemctl enable fail2ban
  systemctl start sendmail
  systemctl enable sendmail
  cp /etc/fail2ban/fail2ban.conf /etc/fail2ban/fail2ban.local
  cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
  sed 's/.*backend =*/backend = systemd./' /etc/fail2ban/jail.local
  echo -e "\e[1;34m
  
  ***************************************************
  installing nginx
  ***************************************************"
  
  sudo yum -y install epel-release 
  sudo yum -y install nginx 
  sudo systemctl start nginx
  echo -e "\e[1;34m
  
  ***************************************************
      configure nginx
  ***************************************************"
  
  cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.backup
  sudo mkdir /etc/nginx/sites-available
  sudo mkdir /etc/nginx/sites-enabled
  sudo mkdir /var/www/misite.com/logs
  
  sudo cp /home/vagrant/misite.conf /home/vagrant/misite.com
  sudo mv /home/vagrant/misite.com /etc/nginx/sites-available &gt; /dev/null
  sudo ln -s /etc/nginx/sites-available/misite.com /etc/nginx/sites-enabled
  sudo rm -rf /etc/nginx/sites-available/default
  sudo chown -R nginx:nginx /var/www 
  sudo service nginx restart &gt; /dev/null
  echo -e "\e[1;34m
  
  ***************************************************
  installing nodejs
  ***************************************************"
  
  sudo yum -y install npm
  sudo yum -y install nodejs
  node --version
  echo -e "\e[1;34m
  
  ***************************************************
  installing mongoDB
  ***************************************************"
  
  sudo mv /home/vagrant/mongodb-org-3.2.repo /etc/yum.repos.d/mongodb-org-3.2.repo
  sudo yum -y install mongodb-org
  systemctl start mongod
  systemctl status mongod
  echo -e "\e[1;34m
  
  ***************************************************
  installing keystone
  ***************************************************"
  
  sudo npm install -g yo
  sudo mkdir /var/www
  sudo mkdir /var/www/misite.com
  cd /var/www/misite.com
  sudo npm install -g generator-keystone
  sudo chown -R vagrant:vagrant /var/www/   
  </code></pre>
  
  <p>The nginx server conf file (/etc/nginx/sites-available/misite.com):
  Here the keystone site should be redirect to the port 80 of the vagrant server <strong>(I think the mistake is in this file but can not see where)</strong></p>
  
  <pre><code># IP which nodejs is running on
  upstream app_misite.com {
      server 0.0.0.0:3000;
  }
  
  # nginx server instance
  server {
      listen 80 default_server;
      listen [::]:80 default_server;
      server_name localhost;
      access_log /var/www/misite.com/logs/access.log;
      error_log /var/www/misite.com/logs/error.log;
  
      location / {
          root /var/www/misite.com;
          index index.html index.htm;
          try_files $uri $uri/ @node;
      }
  
      location @node {
          proxy_set_header Host $http_host;
          proxy_set_header X-Forwarded-For $remote_addr;
          proxy_pass http://app_misite.com;
      }
  }
  </code></pre>
  
  <p>I also remove the <code>default</code> keyword from the /etc/nginx/nginx.conf</p>
  
  <p>Then:
      vagrant ssh
      [vagrant@melanie ~]$cd /var/www/misite.com
      [vagrant@melanie misite.com]$ yo keystone
      [vagrant@melanie misite.com]$ node keystone</p>
  
  <p>And I have keystone js running:</p>
  
  <pre><code>------------------------------------------------
  KeystoneJS Started:
  My Site is ready on http://0.0.0.0:3000
  ------------------------------------------------
  </code></pre>
  
  <p>But still see the default nginx page from <code>http://192.168.1.10/</code></p>
  
  <p>Any help will be appreciate.</p>