How i can translate uppercase to lowercase letters in a rewrite rule in nginx web server?

Yes, you are going to need perl. If you are using Ubuntu, instead of apt-get install nginx-full, use apt-get install nginx-extras, which will have the embedded perl module. Then, in your configuration file: http { … # Include the perl module perl_modules perl/lib; … # Define this function perl_set $uri_lowercase ‘sub { my $r = … Read more

Kubernetes Nginx Ingress not finding service endpoint

I discovered what I was doing wrong. In my application definition I was using name as my selector selector: matchLabels: name: hello-world template: metadata: labels: name: hello-world Whereas in my service I was using app selector: app: hello-world After updating my service to use app, it worked selector: matchLabels: app: hello-world template: metadata: labels: app: … Read more

Let’s Encrypt kubernetes Ingress Controller issuing Fake Certificate

Maybe would be helpful for someone experiencing similar issues. As for me, a forgot to specify hostname in Ingress yaml file for both rules and tls sections. After duplicating the hostname, it started responding with a proper certificate. Example: apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: test-web-ingress annotations: kubernetes.io/ingress.class: nginx spec: tls: – hosts: – my.host.com … Read more

Pass cert password to Nginx with https site during restart

Nginx has ssl_password_file parameter. Specifies a file with passphrases for secret keys where each passphrase is specified on a separate line. Passphrases are tried in turn when loading the key. Example: http { ssl_password_file /etc/keys/global.pass; … server { server_name www1.example.com; ssl_certificate_key /etc/keys/first.key; } server { server_name www2.example.com; # named pipe can also be used instead … Read more

uwsgi IOError: write error

The problem is that clients abort the connection and then Nginx closes the connection without telling uwsgi to abort. Then when uwsgi comes back with the result the socket is already closed. Nginx writes a 499 error in the log and uwsgi throws a IOError. The non optimal solution is to tell Nginx not to … Read more

Nginx only shows welcome page

the debian/ubuntu nginx package comes with a default sites-available that takes over the default host dispatch. Simply remove the default link and it should load your site instead. another gotcha, the debian/ubuntu nginx package also comes with a default index value for the default server in the default site that reads: index index.html index.htm index.nginx-debian.html; … Read more

How to use NGINX as forward proxy for any requested location?

Your code appears to be using a forward proxy (often just “proxy”), not reverse proxy and they operate quite differently. Reverse proxy is for server end and something client doesn’t really see or think about. It’s to retrieve content from the backend servers and hand to the client. Forward proxy is something the client sets … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)