Nginx rewrites being ignored

I am trying to rewrite the following in an nginx server block.

/ # / dmles / login / groupInvitation / login / groupInvitation

I have tried using regex and rewrite without using regex. I have also enabled rewrite logging in nginx. The rewrite log never receives any input.

I have tried the following:

rewrite ^ / # / dmles / login / groupInvitation / login / groupInvitation last;

rewrite ^ / # / dmles /(.*) $ 1 last;

With either of these 2 or no rewrites in place, it is changed to / login / loginForm. Rewriting if it works correctly will skip the login form and go to the group invitation form.

Nginx version is 1.17.6 running on redhat linux 7.6.

Thanks for any help someone can provide.

load balancing: nginx http (from Android app) doesn't work. Https is working fine, and http was / is working fine in apache

I have a laravel / php application that worked fine in apache, but I thought it would be better to switch to nginx to support larger concurrent users.

I have installed we will encrypt SSL certificates and it is working fine over https. When I try http it doesn't work. The problem is that I am planning to use Amazon load balancers and encrypting would be difficult on individual instances. So I guess I need http to work with the load balancer.

When trying through http, the nginx access log is completely blank and the error log shows a single line warning that the signal process has started. Laravel's record is also blank.

2020/03/29 07:03:28 (notice) 21522#21522: signal process started

When I try SSL enabled, there is nothing in the error log and this is what the access log shows

IP ADDRESS HERE - - (29/Mar/2020:08:08:38 +0000) "GET /api/profile HTTP/1.1" 200 383 "-" "okhttp/3.10.0"
IP ADDRESS HERE - - (29/Mar/2020:08:08:38 +0000) "GET /api/shortlisted?page=1 HTTP/1.1" 200 204 "-" "okhttp/3.10.0"
IP ADDRESS HERE - - (29/Mar/2020:08:08:38 +0000) "GET /api/overview HTTP/1.1" 200 160 "-" "okhttp/3.10.0"

The funny thing is that when I try through the browser (even with http), I get the default page of laravel (I can't check the app itself as it is only mobile). The app is using okhttp for the connection, so it might have something to do with it. curl -v it shows a similar answer and an html page too.

After accessing through the browser, I get the following two entries in access.log and nothing in error.log.

IP ADDRESS HERE - - (29/Mar/2020:07:50:33 +0000) "GET / HTTP/1.1" 200 879 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:66.0) Gecko/20100101 Firefox/66.0"
IP ADDRESS HERE - - (29/Mar/2020:07:50:33 +0000) "GET /favicon.ico HTTP/1.1" 200 0 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:66.0) Gecko/20100101 Firefox/66.0"

I thought it could be because ipv6 is not configured correctly, and I configured it correctly and the ipv6 test (https://ipv6-test.com) shows that the domain is ipv6 ready. But it could still be something related.

This is my configuration file (domain / folder modified. I rebooted the server and tried several times after the changes). The default nginx configuration file is unlinked.

server {
    root /var/www/appFolder/public;
    index index.php index.html index.htm index.nginx-debian.html;
    server_name domain.com www.domain.com;

    location / {
            try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ .php$ {
            fastcgi_index index.php;
            fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
    }

    location ~ /.ht {
            deny all;
    }
    #error_log /var/log/nginx/error.log debug;
    #access_log /var/log/nginx/access.log;


    gzip on;
    gzip_types text/plain application/json text/xml application/xml;


#listen (::):443 ssl; # managed by Certbot
#listen 443 ssl; # managed by Certbot
#Other SSL info here, ssl currently commented out for testing # managed by Certbot

    listen 80;
    listen (::):80 ipv6only=on; # Tested ipv6only=on & off and completely removing that part

}

I don't have apache installed on this server. But my other server that has apache works fine. Not tried SSL over there.

Any ideas what the problem might be or how to solve it?

Nginx url Rewrite (help) – Server error

Someone tell me how to rewrite url in Nginx

https://dl.expamledomain.com/download.php?p=524&st=mmmnGreUwmpRTGl7RO9NtGLhgQZrQ1IW&fn=file.zip

to

https://dl.expamledomain.com/dwn/524/mmmnGreUwmpRTGl7RO9NtGLhgQZrQ1IW/file.zip

Second our file download.php in the root folder public_html.

How to adjust nginx maintenance settings when it cannot guarantee routing to same host?

I have a scenario where multiple servers are running one nginx instance. For what it's worth, these are mostly just rough requests. All of these hosts are behind a hardware load balancer and it is not necessarily possible (or desirable, for various reasons) to enable stickiness.

Despite this, we currently still respect life support to reduce SSL handshakes; but I think this only works if a client is routed to the same host after the initial handshake.

As a result of this, we end up with many thousands of inactive connections that are open on each of our hosts; At some point, our hardware router gets fed up and starts sending RST packets to clients. (If not, we suspect that we would hit an open connection limit on nginx, so there is still a problem beyond that hardware router.)

My question is (or rather, my questions are):
– Can I make nginx treat each request as a simple transaction and disrespect keep-alive? Is that reasonable? I know some previous services I've worked on have basically done this, but are there any potential downsides to clients who expect their Keep-Alive heading to be honored? Obviously this could result in more SSL / TLS negotiation, but that's fine with me.
– Are there best practices for gracefully terminating inactive client connections in nginx?
– Would it be reasonable to allow these idle connections to accumulate on the host? Up to what point? Tens of thousands of inactive connections?

nginx variable for the record that has the rewrite target

I have 301 visits to the access log, but am looking for a way to include the destination, or "Location" as it is in the http response header, to the access log. I have examined all the variables, but none seems to be that. Thank you.

Nginx does not say "starting … reverse proxy" when I have tried to configure it as reverse proxy, but it says "starting … web server"

I am setting up a new CentOS 7 reverse proxy with nginx.
When nginx starts it shows:

Nginx started – high performance web server

I want a reverse proxy. Is there something to configure? I thought you would see:

high performance web server and reverse proxy

Is there something I have done wrong or should do here?

nginx reverse proxy when starting "nginx started – high performance web server"

Set up a new CentOS 7 reverse proxy with nginx.

When started it shows "nginx started – high performance web server"

I want a reverse proxy. Is there something to configure? I thought you would see "high performance web server and reverse proxy".

Is there something I have done wrong or should do here?

Thank you

Julian

Nginx Proxy svg broken

Hi,

We have configured Nginx as Edge node. The website works fine from the edge (caching and proxy requests to the source as needed). However, prox … | Read the rest of https://www.webhostingtalk.com/showthread.php?t=1802218&goto=newpost

nginx: how to redirect depending on a range of IP addresses?

I am trying to make a site only accessible from the local network and people on the external network will get a static page that says some other message.

This is what I'm trying to do, but it doesn't seem to work. Where did I go wrong?

         if ($remote_addr != 192.168.1.0/24) {
                   rewrite ^/* /covid19 last;
         }

Nginx installed on Windows on EC2 (AWS)

Hi everyone,
I have installed a basic Windows server with Nginx on AWS.
I tried the installation and it's fine. (On the server, I typed "localhost" and the browser showed the Nginx welcome page).
I am having trouble connecting from another machine. I have tried ping + IP, ping + DNS, and did the same with HTTP (IP or DNS name).
The server is unreachable.
I have checked network security and it is fine.
HTTP TCP 80 0.0.0.0/0 –
HTTP TCP 80 :: / 0 –
RDP …

Nginx installed on Windows on EC2 (AWS)