nginx-reverse-proxy

Monitoring nginx (500's) with telegraf

梦想的初衷 提交于 2019-12-08 06:19:39
问题 I'd like to understand what my nginx instance is returning and who it's asking to handle requests. What fraction of my queries get handled by rails, what fraction are handled directly by nginx, what fraction are heading off to nginx_status, etc. Similarly, I'd also like to understand things like how many of which HTTP result codes I'm returning. If there's a peak in 500's, I'd like to know. The telegraf nginx plugin provides some very basic stats on nginx but no more. I've seen some vaguely

502 Bad Gateway - NGINX no resolver defined to resolve

北慕城南 提交于 2019-12-07 20:21:14
问题 I have created a proxy pass for multi URLs. listen 80; listen [::]:80; server_name ~^(.*)redzilla\.11\.75\.65\.21\.xip\.io$; location / { set $instname $1; proxy_pass http://${instname}redzilla.localhost:3000; } When I call to this service using chrome, It was triggered 502 error. http://test.redzilla.11.75.65.21.xip.io/ I put below location tag by hard coding the URL. location /redzilla { proxy_pass http://test.redzilla.localhost:3000; } Then It is working for only above URL. I want to know

Nginx HTTP not redirecting to HTTPS 400 Bad Request “The plain HTTP request was sent to HTTPS port”

十年热恋 提交于 2019-12-07 10:54:32
问题 I'm running nginx in docker. HTTPS works fine but when I explicitly make HTTP request I get the following error 400 Bad Request The plain HTTP request was sent to HTTPS port nginx.conf is as follows worker_processes auto ; events {} http { include /etc/nginx/mime.types; access_log /var/log/nginx/main.access.log; server { listen 80; location / { return 301 https://localhost:3000$request_uri; } } server { listen 443 ssl; server_name localhost:3000; root /var/www/html; ssl_certificate /etc/nginx

nginx reverse proxy params docker

会有一股神秘感。 提交于 2019-12-07 03:42:27
when doing a post to let url = '/api/registerCoin' it works. nginx forwards this to server:3000 , which is good! When I try the post to /api/updatePost with params nginx doesn't seem to point to the server. I am getting: /api/findPostData Failed to load resource: the server responded with a status of 404 (Not Found) in the browser. Is that due to the params being added to the url? I am having the same issue making a post to: POST https://v2.steemconnect.com/api/broadcast 500 () this seems not to route via server. even though: https://v2.steemconnect.com/oauth2/authorize?client_id=cr for oauth

502 Bad Gateway - NGINX no resolver defined to resolve

最后都变了- 提交于 2019-12-06 13:41:24
I have created a proxy pass for multi URLs. listen 80; listen [::]:80; server_name ~^(.*)redzilla\.11\.75\.65\.21\.xip\.io$; location / { set $instname $1; proxy_pass http://${instname}redzilla.localhost:3000; } When I call to this service using chrome, It was triggered 502 error. http://test.redzilla.11.75.65.21.xip.io/ I put below location tag by hard coding the URL. location /redzilla { proxy_pass http://test.redzilla.localhost:3000; } Then It is working for only above URL. I want to know how to create proxy pass for multiple URL within single location tag. ( please note : URL pattern is *

configure nginx to make a background request

喜夏-厌秋 提交于 2019-12-06 08:54:33
I am building an application where I need to do some analytics on the api-data combination usage. Below is my nginx configuration - location /r/ { rewrite /r/(.*)$ http://localhost:3000/sample/route1/$1 redirect; post_action /aftersampleroute1/$1; } location /aftersampleroute1/ { rewrite /aftersampleroute1/(.*) /stats/$1; proxy_pass http://127.0.0.1:3000; } location /r/ is used to redirect the browser request http://localhost:80/r/quwjDP4us to api /sample/route1/quwjDP4us which uses the id quwjDP4us to do something. Now in the background I want to pass the id quwjDP4us to an stats api /stats

Nginx- How can I serve my static content with https that has a proxy in location block?

自古美人都是妖i 提交于 2019-12-02 08:56:11
问题 My server listen 443 port and redirects the requests to another port in the server. Also my server listen 80 port and displays a static content the user when they browse http://www.xxxx.com But I want also to display static content when user browse https://www.xxxx.com How can I manage this ? My Nginx config file is ; server { listen 443 ssl; server_name xxxx.com; ssl_certificate /etc/nginx/ssl/nginx.crt; ssl_certificate_key /etc/nginx/ssl/nginx.key; location / { expires off; proxy_pass http:

How to run NUXT (npm run dev) with HTTPS in localhost?

﹥>﹥吖頭↗ 提交于 2019-12-01 06:29:40
问题 EDIT: Updated the text in general to keep it shorter and more concise. I am trying to configure HTTPS when I run npm run dev so I can test MediaStream and alike locally (for which browsers require me to provide HTTPS). I am trying to configure it through nuxt.config.js but without any success. Here is my nuxt.config.js file: import fs from "fs"; import pkg from "./package"; export default { mode: "spa", /* ** Headers of the page */ head: { title: pkg.name, meta: [ { charset: "utf-8" }, { name

Keycloak with NGINX proxy server not authenticating rest api

吃可爱长大的小学妹 提交于 2019-11-30 15:36:03
I have a sample app which correctly secures the rest api locally without nginx. Now when I put this in production behind a nginx proxy it does not work. No errors. It allows all request. Front end serer with ssl is https://frontend.com Back end server with ssl is https://backend.com Keycloak proxy forward is true Front end server(node server on 9000) <-> NGINX <-> Keycloak (running on 8180) nginx file sample upstream keycloak_server { server localhost:8180; } upstream node_server { server localhost:9000; } location /auth/ { proxy_pass http://keycloak_server; proxy_http_version 1.1; proxy_set

Angular App running on nginx and behind an additional nginx reverse proxy

房东的猫 提交于 2019-11-28 02:55:39
问题 I'm currently trying to create a reverse proxy for two Angular apps. I want the apps to be both accessible through the 443 port of the docker host with SSL enabled (like https://192.168.x.x/app1 and https://192.168.x.x/app2), so that the users don't have to type in the port numbers for each app. My setting is, that every part of the application runs within its own Docker container: - Container 1: Angular App 1 (Port 80 exposed to host on port 8080) - Container 2: Angular App 2 (Port 80