Answer the question
In order to leave comments, you need to log in
Nginx invalid parameter in upstream?
I want to set up nginx for my vps. You need to do a redirect so that you do not need to enter the port in the url. When setting the address, I get an error:
invalid parameter "xxx.xxx.xxx.xxx:8080" in /etc/nginx/conf.d/default.conf:2
upstream backend_upstream {
server xxx.xxx.xxx.xxx:8080; //Скрыл ip port :)
}
server {
listen 80;
server_name _ samplename;
root /app/dist;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
location ~ (.*\.js\.map|.*.css.map) {
return 404;
}
location / {
add_header Cache-Control "no-cache";
try_files $uri /index.html;
}
location @backend {
proxy_pass http://backend_upstream;
}
location /api {
try_files $uri @backend;
}
location /images/ {
root /app/public;
}
location /rails {
proxy_pass http://backend_upstream;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question