0

I'm using an NGINX reverse proxy, with wild card certs installed on the reverse proxy. Routing the NGINX reverse proxy traffic to standard web servers that are running Apache2 and NGINX Web services is working great.

However, routing to a server that uses PHP code and Apache2 does not show the page correctly. I believe the PHP code or header information is not passing through the reverse proxy correctly.

EVERYTHING LOOKS GREAT when I go directly to the PHP Web server using HTTP and its internal IP address.

Web PAGE layout and graphics look entirely different, The graphical layout is missing when routing to my PHP server through the reverse proxy. The NGINX reverse_proxy configuration is as follows:

   listen 80;
   server_name itop.My_Domain_Name.org;
   return 301 https://$host$request_uri;
  }
  server {
   listen 443 ssl;
   server_name itop.surfingjoe.org;
   ssl_certificate /etc/letsencrypt/live/My_Domain_Name.org/fullchain.pem;
   ssl_certificate_key /etc/letsencrypt/liveMy_Domain_Name.org/privkey.pem;
  location / {
      proxy_pass http://192.168.1.4;
      include proxy_params;
  }

}``` I'm sure there is a change I need to make to the NGINX configuration in order to make it work, but I'm a newbie to using NGINX reverse proxy and sure would like some help, please.

1 Answers1

0

HBrujin did manage to answer the question with the statement, "Don't just rely on your guts, check". So I did a check.

Using the Firefox browser, I used "Inspect" on the failed web page and found the problem. I found the trailing slash was missing between the domain name and a sub-directory.

When configuring the application server (ITOP, an ITSM solution), during the configuration of the application via a browser, I input the application's domain address. For example, https://example.com/itop, but I should have placed the application's address as https://example.com/itop/. The difference is that the trailing slash ("/") was missing in my configuration of the application.

I have no clue why addressing via IP address directly worked but via reverse proxy fails. When HBrujin asked me to "check" and not trust my gut, I used Firefox inspect mode and found the problem.

So Thank You

PS. Turns out the problem was not my configuration of NGINX reverse proxy after all.