I've set up the AspCore + Angula7 project on Ubuntu 18.04.2 LTS
Web server NGINX.
Everything works fine, but I have trouble to change tenant from login page. I enter an existing tenant name and the page just refreshes. Also when I go to administration as a HOST, I create tenant then I try Impersonate (Log in as this tenant) it refreshes page and throws javascript alert (Internal Error).
This works locally on my Pc when running on IIS Express from Visual Studio + Angular ng serve built in server.
Angular NGINX config:
server { listen 1432; server_name 10.10.10.141;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
location / {
root /var/www/pacapime-front;
index index.html index.htm;
try_files $uri $uri/ /index.html?$args;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/pacapime-front;
}
}
ASP.Core NGINX config:
server { listen 8080; #server_name asp.develop *.asp.develop; server_name 10.10.10.141;
location / {
proxy_pass http://localhost:5000;
#proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
#proxy_set_header $http_connection
}
}
Do I miss something in Nginx configurations? It seems that some headers are not passed or something like that.
2 Answer(s)
-
1
Can this solution solve your problem? https://stackoverflow.com/questions/49783689/cannot-get-header-that-contains-a-period-from-nginx?answertab=active#tab-top https://github.com/aspnetboilerplate/aspnetboilerplate/issues/4510#issuecomment-492403342
-
0
Yes, thanks.