Welcome! Log In Create A New Profile

Advanced

WordPress Website not rendered properly via nginx reverse proxy

All files from this thread

File Name File Size   Posted by Date  
smime.p7s 4.4 KB open | download Nikolaos Milas via nginx 10/15/2024 Read message
smime.p7s 4.4 KB open | download Nikolaos Milas via nginx 10/15/2024 Read message
smime.p7s 4.4 KB open | download Nikolaos Milas via nginx 10/15/2024 Read message
Nikolaos Milas via nginx
October 15, 2024 09:34AM
Hello,

We are using nginx on a server as a reverse proxy and it works fine
serving multiple websites.

Now I am trying to reverse proxy another one, a WP website, in the same
way, but it won't render correctly.

I can only see the main page areas and only some text at some places,
but most content, including images, is missing.

What may be wrong?

I have checked error logs but I don't see anything logged.

Any suggestions will be most appreciated.

In the config below, the original site (http://example.private.noa.gr)
works without issues (it is rendered properly), but the proxied one
(https://example.noa.gr) does not.

Here is the config:

===========================================================

server {
    listen       80;
    listen       [::]:80;

    server_name  example.noa.gr;

    return 301 https://example.noa.gr/$request_uri;

    access_log  /var/log/example_http_access_log main;
    error_log /var/log/example_http_error_log warn;

}

server {

    listen       443 ssl;
    listen       [::]:443 ssl;

    server_name  example.noa.gr;

    allow 127.0.0.1;
    allow ::1;
    allow 10.10.0.0/16;
    deny all;

    ssl_certificate /etc/pki/tls/certs/star_noa_gr_cert-current.crt;
    ssl_certificate_key /etc/pki/tls/private/star_noa_gr-1243437.key;

    access_log  /var/log/example_https_access_log main;
    error_log /var/log/example_https_error_log warn;

    client_max_body_size 50M;

    location / {

        proxy_pass http://example.private.noa.gr:80/;

        proxy_set_header Host example.private.noa.gr;

        proxy_set_header X-Forwarded-Host   $http_host;
        proxy_set_header X-Forwarded-Server $http_host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto  $scheme;
        proxy_set_header X-Real-IP          $remote_addr;

        proxy_buffer_size                   16k;
        proxy_max_temp_file_size            2048m;
        proxy_buffers                       8 16k;

    }
}

===========================================================

(Note: the buffer directives were added to avoid the "an upstream
response is buffered to a temporary file" error.)

Thanks in advance.

Best regards,
Nick

_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Attachments:
open | download - smime.p7s (4.4 KB)
Subject Author Posted

WordPress Website not rendered properly via nginx reverse proxy Attachments

Nikolaos Milas via nginx October 15, 2024 09:34AM

WordPress Website not rendered properly via nginx reverse proxy

Kevin Weis via nginx October 15, 2024 10:12AM

Re: WordPress Website not rendered properly via nginx reverse proxy Attachments

Nikolaos Milas via nginx October 15, 2024 05:20PM

Re: WordPress Website not rendered properly via nginx reverse proxy Attachments

Nikolaos Milas via nginx October 15, 2024 06:08PM

Re: WordPress Website not rendered properly via nginx reverse proxy

Richard Stanway via nginx October 15, 2024 06:56PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 148
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready