nginx

Nginx - Invalid number of arguments in client_max_body_size

。_饼干妹妹 提交于 2021-02-08 07:45:24
问题 I'm trying to set client_max_body_size in my nginx config file. server { listen 80; server_name ****.com; root ****; client_max_body_size 32m location / { try_files $uri /app.php$is_args$args; } location ~ ^/(app_dev|config)\.php(/|$) { fastcgi_pass 127.0.0.1:9000; fastcgi_split_path_info ^(.+\.php)(/.*)$; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; fastcgi_param DOCUMENT_ROOT $realpath_root; } location ~ ^/app\.php(/|$) { fastcgi_pass 127.0.0.1

Rewrite HTTP to HTTPS Django

一世执手 提交于 2021-02-08 07:29:34
问题 I currently have a Django web server where I need to have users access through HTTPS. I went through this link Django HTTP to HTTPS and understand I need to implement a rewrite rule but am unsure about which file to modify. Here is the code snippet in nginx: server { listen 80; rewrite ^(.*) https://$host$1 permanent; } Although, I am confused as to where this would be placed. Any help would be greatly appreciated! Reason for all of this is I am implementing an iOS e-commerce application that

oauth2-proxy authentication calls slow on kubernetes cluster with auth annotations for nginx ingress

筅森魡賤 提交于 2021-02-08 07:25:19
问题 We have secured some of our services on the K8S cluster using the approach described on this page. Concretely, we have: nginx.ingress.kubernetes.io/auth-url: "https://oauth2.${var.hosted_zone}/oauth2/auth" nginx.ingress.kubernetes.io/auth-signin: "https://oauth2.${var.hosted_zone}/oauth2/start?rd=/redirect/$http_host$escaped_request_uri" set on the service to be secured and we have followed this tutorial to only have one deployment of oauth2_proxy per cluster. We have 2 proxies set up, both

oauth2-proxy authentication calls slow on kubernetes cluster with auth annotations for nginx ingress

丶灬走出姿态 提交于 2021-02-08 07:21:20
问题 We have secured some of our services on the K8S cluster using the approach described on this page. Concretely, we have: nginx.ingress.kubernetes.io/auth-url: "https://oauth2.${var.hosted_zone}/oauth2/auth" nginx.ingress.kubernetes.io/auth-signin: "https://oauth2.${var.hosted_zone}/oauth2/start?rd=/redirect/$http_host$escaped_request_uri" set on the service to be secured and we have followed this tutorial to only have one deployment of oauth2_proxy per cluster. We have 2 proxies set up, both

Redirect 301 Nginx with query string “?amp” - AMP Nginx Redirect

若如初见. 提交于 2021-02-08 06:54:18
问题 I'm trying to make a rewrite rule in Nginx, that contains "?amp" at the end of the request, like this: From http://mywebsite.com/path1/lalala?amp To http://mywebsite.com/path1/lalala It's a redirect 301. I tried some rules, but they do not work, I get many redirects (looping). Examples that did not work. rewrite ^/path1/lalala.*? htttp://mywebsite.com/path1/lalala? permanent; Or rewrite ^/path1/lalala.*? /path1/lalala? permanent; I think the problem is in the query string "?amp". Do you know

nginx with uwsgi and flask shows bad request for https connections only

╄→尐↘猪︶ㄣ 提交于 2021-02-08 06:44:23
问题 I am trying to host a demo flask application which return "hi there" when run. I have succeeded to host the application with http and https using Uwsgi alone with this configuration. When i try to access my application on localhost with https config, i get 502. Bad Gatewat nginx/1.4.6 (Ubuntu) here goes my deployment.ini (uwsgi configuration file) [uwsgi] shared-socket = 127.0.0.1:8443 master = true processes = 5 daemonize = /path/to/my/mylog.log wsgi-file=/path/to/my/demo.py callable=app

Laravel + Nuxt + Nginx: WebSocket is closed before the connection is established

江枫思渺然 提交于 2021-02-08 06:38:48
问题 General scheme and project configuration files The project consists of two parts: Server part - Laravel (api) Customer part - NuxtJs (client) A minimum project configuration has been prepared for the test: Laravel Websockets packages have been installed: beyondcode/laravel-websockets: https://beyondco.de/docs/laravel-websockets/getting-started/introduction pusher/pusher-php-server: https://pusher.com/tutorials/web-notifications-laravel-pusher-channels File composer.json : ... "require": {

Rewrite rule with nginx replace get variable with slach

瘦欲@ 提交于 2021-02-08 05:56:13
问题 I've been reading everything i could find for two days now but nothing seems to work I have an url like this http://www.mysite.com/auction.php?category=23140 and want make a rewrite rule so it will appears like that http://www.mysite.com/auction/category/23140.php I do that only in order to build seo friendly url but so far nothing have worked. rewrite ^/auction.php?category=(.*)$ /auction/category/$1 last; It look so simple i realy don't know why it doesn't work. Should i put this line in

Rewrite rule with nginx replace get variable with slach

陌路散爱 提交于 2021-02-08 05:55:09
问题 I've been reading everything i could find for two days now but nothing seems to work I have an url like this http://www.mysite.com/auction.php?category=23140 and want make a rewrite rule so it will appears like that http://www.mysite.com/auction/category/23140.php I do that only in order to build seo friendly url but so far nothing have worked. rewrite ^/auction.php?category=(.*)$ /auction/category/$1 last; It look so simple i realy don't know why it doesn't work. Should i put this line in

Amazon ECS - Permission denied when using IAM role on Docker entrypoint

人走茶凉 提交于 2021-02-08 05:31:18
问题 I'm looking for a way to inject secrets/certificates into Amazon ECS containers. In my case, it's a simple nginx container. I've been following this post, using AWS Parameter Store: https://aws.amazon.com/blogs/compute/managing-secrets-for-amazon-ecs-applications-using-parameter-store-and-iam-roles-for-tasks/ Here's the basic gist: On my Dockerfile, I attach a script on entrypoint which installs the AWS client and fetches the keys from AWS parameter store. Dockerfile FROM nginx:1.16.0 ...