Support » Fixing WordPress » Images not loading with domain mapping

  • I’m having a headache attempting to get my site operational.

    It’s running NGINX with a sub-folder multi-site setup. It worked fine until I attempted to map a domain name to it, and now the upload URLs no longer work.

    Here’s an example of a URL. The first one is the domain mapped one which doesn’t work, the second is the non-domain mapped one which does work.×502.jpg×502.jpg

    Any ideas on why domain mapping wouldn’t work with the uploads? I’m drawing a blank on what could be causing it and aren’t even sure where to look to debug it.

    I’m not sure if it’s related, but the permalink URL options listed in the admin panel have index.php in them. I can get rid of that by simply entering a custom permalink setup, but for whatever reason, those index.php’s are in there by default. Here’s an example … /index.php/%year%/%monthnum%/%day%/%postname%/

    All help greatly appreciated 🙂

    PS: I have very little experience with NGINX, so I wouldn’t rule out some sort of simple config issue I’m not aware of yet.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Chris Olbekson suggested it might be my NGINX config that was the problem so just pasting it here in case it helps with debugging …

    This one is from sites-enabled …

    And this one is my nginx.conf …

    Chris Olbekson


    Level 12 Bug Squasher & Forum Moderator

    I made a few changes to the server file in sites-enabled

    Here is my default server file for multisite:

    Also I recommend using the unix socket instead of the tcp connection for fast_cgi_pass.

    Add this to nginx.conf

    upstream php {
    	server unix:/var/run/php5-fpm.sock;

    Then in the server file change the localhost domain in each fast_cgi_pass to:
    fastcgi_pass php;

    Before you restart edit /etc/php5/fpm/pool.d/www.conf and change the listener from listen to listen = /var/run/php5-fpm.sock

    Then restart php /etc/init.d/php5-fpm restart then restart nginx

    This will give you a little more performance.

    Thanks to @chris_olbekson who figured out a solution by rejigging my config file.

    Edit: It seems Chris beat me to the punch.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Images not loading with domain mapping’ is closed to new replies.