0

I've setup a proxy NGINX that access a Wordpress server on 10.0.0.151:

# # Default server configuration # server { listen 80 default_server; listen [::]:80 default_server; root /var/www/html; # Add index.php to the list if you are using PHP index index.html index.htm index.nginx-debian.html; server_name _; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; } } server { server_name judith.com www.judith.com *.judith.com; return 301 https://www.judith.com$request_uri; } server { listen [::]:443 ssl; listen 443 ssl; ssl_certificate /etc/letsencrypt/live/judith.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/judith.com/privkey.pem; include /etc/letsencrypt/options-ssl-nginx.conf; ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; server_name judith.com www.judith.com *.judith.com; location / { proxy_pass http://10.0.0.151; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location ~ ^/(images/|img/|javascript/|js/|css/|stylesheets/|flash/|media/|static/|robots.txt|humans.txt|favicon.ico) { root http://10.0.0.151; access_log off; expires max; } client_max_body_size 2000M; } 

When going to https://www.judith.com I can access the web page, get the certification (trusted page) and show the page, but without all static content (images, css, etc.).

How to make it properly show all static content (js, css, images, etc)?

Sure I'm missing something simple... Help appreciated.

3
  • What does root http://10.0.0.151; mean? This should be a pathname to where the files are located. Commented Jul 22, 2022 at 8:21
  • Are your static files located at the 10.0.0.151 server or on the server that runs nginx? Commented Jul 22, 2022 at 14:42
  • 10.0.0.151 is the server with the static content (Wordpress). NGINX is 10.0.0.10. Commented Jul 22, 2022 at 19:26

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.