nginx-config

Set proxy_pass in nginx based on request_method

二次信任 提交于 2021-01-29 13:02:14
问题 I have two application and a nginx server on top of that. I want to proxy all GET requests coming on nginx to one app running on http://127.0.0.1:9101/ and proxy all other request methods to http://10.41.115.241:8000/ I have tried couple of options but none worked I have tried using limit_exempt location /api/v1/executions { error_page 502 = @apiError; rewrite ^/api/(.*) /$1 break; proxy_pass http://127.0.0.1:9101/; limit_except PUT POST DELETE { proxy_pass http://10.41.115.241:8000/; } proxy

Set proxy_pass in nginx based on request_method

前提是你 提交于 2021-01-29 12:21:16
问题 I have two application and a nginx server on top of that. I want to proxy all GET requests coming on nginx to one app running on http://127.0.0.1:9101/ and proxy all other request methods to http://10.41.115.241:8000/ I have tried couple of options but none worked I have tried using limit_exempt location /api/v1/executions { error_page 502 = @apiError; rewrite ^/api/(.*) /$1 break; proxy_pass http://127.0.0.1:9101/; limit_except PUT POST DELETE { proxy_pass http://10.41.115.241:8000/; } proxy

NGINX htpasswd 404 not found

。_饼干妹妹 提交于 2021-01-29 08:32:09
问题 I am using NGINX to run my website, I wanted to enable authentication to the website, so I did, using .htpasswd file and it worked, here's part of my default.conf file: server { listen 80; server_name localhost; #charset koi8-r; #access_log /var/log/nginx/log/host.access.log main; auth_basic "Administrator Login"; auth_basic_user_file /usr/share/nginx/html/.htpasswd; location / { root /usr/share/nginx/html; index index.html index.html; } And it works, this way my WHOLE page requires

Nginx RTMP streaming is not reaching the RTMP endpoint

风格不统一 提交于 2021-01-28 23:32:21
问题 I'm trying to redirect an RTMP streaming from my pc into Ngninx using the nginx-rtmp-module following the examples to redirect the stream into an Azure Media Service live event. But it won't detect the encoder. I'm using the following nginx.conf: events {} rtmp { server { listen 1935; chunk_size 4096; application live { live on; record off; push rtmp://d-myamsacc-usct.channel.media.azure.net:1935/live/x4t/x4t; } } } My OBS is configured to stream to rtmp://191.123.1.72/live with a stream key

Nginx RTMP streaming is not reaching the RTMP endpoint

别来无恙 提交于 2021-01-28 23:17:06
问题 I'm trying to redirect an RTMP streaming from my pc into Ngninx using the nginx-rtmp-module following the examples to redirect the stream into an Azure Media Service live event. But it won't detect the encoder. I'm using the following nginx.conf: events {} rtmp { server { listen 1935; chunk_size 4096; application live { live on; record off; push rtmp://d-myamsacc-usct.channel.media.azure.net:1935/live/x4t/x4t; } } } My OBS is configured to stream to rtmp://191.123.1.72/live with a stream key

Nifi on docker behind nginx processor configure not opening

ぐ巨炮叔叔 提交于 2021-01-28 11:31:07
问题 Followed guide ( https://michalklempa.com/2019/04/nifi-registry-nginx-proxy-tls-basic-auth/ ) to set up nginx basic auth, however instead of proxy for nifi-registry I set it up for nifi. Auth is working and page is accessible but somehow processor configure window not opening. The issue is due to nginx since direct access to nifi through HTTP exposed ports works ,just not behind nginx proxy. below is the config I am using: server { listen 9988 ssl; root /usr/share/nginx/html; index index.html

NGINX try_files with name as the last word in the $uri

雨燕双飞 提交于 2021-01-28 07:42:50
问题 I've got an nginx on my server and I am trying to get it to open the file ' /config/www/pp1/index.php ' for address https://example.com/pp1 and ' /config/www/interpreter/index.html ' for https://example.com/interpreter. Furthermore all things like https://example.com/interpreter/res/docs should fire up ' /config/www/interpreter/res/docs.html '. I have made many attempts. Currently my default config file in /site-confs looks like this: server { listen 80; listen 443 ssl http2; server_name kni

NGINX try_files with name as the last word in the $uri

对着背影说爱祢 提交于 2021-01-28 07:31:36
问题 I've got an nginx on my server and I am trying to get it to open the file ' /config/www/pp1/index.php ' for address https://example.com/pp1 and ' /config/www/interpreter/index.html ' for https://example.com/interpreter. Furthermore all things like https://example.com/interpreter/res/docs should fire up ' /config/www/interpreter/res/docs.html '. I have made many attempts. Currently my default config file in /site-confs looks like this: server { listen 80; listen 443 ssl http2; server_name kni

Ingress Nginx - how to serve assets to application

江枫思渺然 提交于 2021-01-25 07:08:08
问题 I have an issue, I am deploying an application on [hostname]/product/console, but the .css .js files are being requested from [hostname]/product/static, hence they are not being loaded and I get 404. I have tried nginx.ingress.kubernetes.io/rewrite-target: to no avail. I also tried using: nginx.ingress.kubernetes.io/location-snippet: | location = /product/console/ { proxy_pass http://[hostname]/product/static/; } But the latter does not seem to be picked up by the nginx controller at all.

Ingress Nginx - how to serve assets to application

本小妞迷上赌 提交于 2021-01-25 07:07:08
问题 I have an issue, I am deploying an application on [hostname]/product/console, but the .css .js files are being requested from [hostname]/product/static, hence they are not being loaded and I get 404. I have tried nginx.ingress.kubernetes.io/rewrite-target: to no avail. I also tried using: nginx.ingress.kubernetes.io/location-snippet: | location = /product/console/ { proxy_pass http://[hostname]/product/static/; } But the latter does not seem to be picked up by the nginx controller at all.