Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

nginx server

$
0
0
hi guys plase help.

i have a problem with nginx conf settings,
i have a backend server that provides an api :
say:

>> 192.168.2.248 (windows server)
this is also used for webhooks

and other servers:
>> 192.168.2.44 (ubuntu - nginx )
run web application


this is the configuration :
server {
listen 80;
listen 443 ssl;
client_max_body_size 10M;
root /var/www/aio-commerce.com/html;
index index.html index.htm index.nginx-debian.html;
ssl_certificate /var/www/aio-commerce.com/html/localhost.crt;
ssl_certificate_key /var/www/aio-commerce.com/html/localhost.key;

server_name 192.168.2.244;

location / {
# Serve static files or fallback to index.html
try_files $uri $uri/ /index.html?q=$uri&$args;
}

location /api {
# Proxy settings for webhook requests
proxy_pass http://192.168.2.248/api/;
proxy_set_header X-Forward-Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

# Pass the 'Cookie' header
proxy_set_header Cookie $http_cookie;
}
}

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>