Nginx Multisite doesn't show uploaded images
-
I have Nginx set up as a reverse proxy on my VPS. I also have a WordPress multisite installation set up. Everything works just fine except for the uploaded images. I can create new sites and I can upload images to those site but the images don’t display in the backend or on the frontend.
Here is the site config for Nginx:
map $http_host $blogid { default -999; include /home/cpress/public_html/wp-content/plugins/nginx-helper/map.conf; } server { error_log /var/log/nginx/vhost-error_log warn; listen server.ip.address:80; server_name site.com www.site.com *.site.com; access_log /usr/local/apache/domlogs/site.com-bytes_log bytes_log; access_log /usr/local/apache/domlogs/site.com combined; root /home/cpress/public_html; index index.php index.html index.htm; location / { location ~.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|html|htm|txt|js|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso)$ { expires 30d; try_files $uri $uri/ /index.php?$args; } rewrite /wp-admin$ $scheme://$host$uri/ permanent; error_page 405 = @backend; add_header X-Cache "HIT from Backend"; proxy_pass https://server.ip.address:8081; include proxy.inc; } location @backend { internal; proxy_pass https://server.ip.address:8081; include proxy.inc; } location ~ .*\.(php|jsp|cgi|pl|py)?$ { proxy_pass https://server.ip.address:8081; include proxy.inc; } location ~ /\.ht { deny all; } location ~ \.php$ { try_files $uri @wordpress; 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_pass https://server.ip.address:8081; } location ~ ^/files/(.*)$ { try_files /wp-content/blogs.dir/$blogid/$uri /wp-includes/ms-files.php?file=$1; access_log off; log_not_found off; expires max; } location ^~ /blogs.dir { internal; alias /home/cpress/public_html/wp-content/blogs.dir; access_log off; log_not_found off; expires max; } }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Nginx Multisite doesn't show uploaded images’ is closed to new replies.