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

    https://hellyer.net.nz/

    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.
    https://hellyer.net.nz/files/2012/06/mantjernet-1-fdr-680×502.jpg
    https://pressabl.hellyer.net.nz/ryanhellyer/files/2012/06/mantjernet-1-fdr-680×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)
  • Thread Starter Ryan Hellyer

    (@ryanhellyer)

    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 …
    https://pastebin.com/03NS1jsN

    And this one is my nginx.conf …
    https://pastebin.com/NkUYRksE

    I made a few changes to the server file in sites-enabled https://pastebin.com/ME1h91Cb

    Here is my default server file for multisite: https://gist.github.com/2765663

    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 127.0.0.1:9000 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.

    Thread Starter Ryan Hellyer

    (@ryanhellyer)

    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.