mercredi 27 juin 2018

Ember and Node.js Nginx Configuration amazon EC2 Ubuntu Server

Hello i am getting this error when i try and load my site:

enter image description here

Reading into it I think there is an issue with my front end not being able to contact my backend. Ive done a CURL to my backend inside the server and outside and everything works. Also deploying with Ember-Cli-mirage works fine as well, Leading me to belive there is an issue with my NGINX config files. I have two config files one for the front end and one for the backend:

Front end Ember config:

 server {
 listen 80 default_server;
 listen [::]:80 default_server ipv6only=on;
 root /usr/local/t;
 index index.html;
  location / {
 try_files $uri $uri/ /index.html;
 }
 }

My backend Node.js Express config:

 server {
   listen 80;
   server_name default_server;

    root /usr/local/cloudBackend;
   index index.html index.htm;

   access_log /var/log/nginx/cpe.access.log;
   error_log /var/log/nginx/cpe.error.log notice;

   #  auth_basic "Restricted";
   #  auth_basic_user_file /etc/nginx/.htpasswd;

  location / {
    proxy_pass http://localhost:3001;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
}
}

Any help would be much appreciated.




Aucun commentaire:

Enregistrer un commentaire