situation with friendly urls

Rick Gutierrez xserverlinux at gmail.com
Thu Mar 30 11:15:34 UTC 2023


Hi list, I have a situation that I want to share, we develop a small
application in php that has friendly urls, it has a section in English
and the other in Spanish, but when we put it in the backend server the
project does not load correctly.

I want to share a bit about the design of our infrastructure:

users =========> Proxy reverse ===========backend server

I've tried different configurations on the backend server and the
reverse proxy, but still can't get it to load.

For example, in the backend I put this type of application to load:

location /

    {

      try_files $uri $uri/ /index.php?$args;
#      try_files $uri /index.php;
      root /var/tmp/sites/site.com/htdocs;
       index index.php index.html index.htm;

    }



proxy reverse :

location / {


        proxy_http_version 1.1;
        proxy_set_header Connection "";
        proxy_set_header Host $host;

proxy_set_header X-Real-IP  $remote_addr;

        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

  proxy_connect_timeout 900s;

        proxy_send_timeout 900s;

        proxy_read_timeout 900s;

proxy_buffer_size 64k;

proxy_buffers 16 32k;

proxy_busy_buffers_size 64k;

proxy_redirect off;

proxy_request_buffering off;

proxy_buffering off;

        proxy_pass http://backend2;


    }

I don't see any errors in the log,

any advice?

-- 
rickygm

http://gnuforever.homelinux.com


More information about the nginx mailing list