WordPress.org

Ready to get started?Download WordPress

Forums

Images not loading with domain mapping (4 posts)

  1. Ryan Hellyer
    Member
    Posted 2 years ago #

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

    http://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.
    http://hellyer.net.nz/files/2012/06/mantjernet-1-fdr-680x502.jpg
    http://pressabl.hellyer.net.nz/ryanhellyer/files/2012/06/mantjernet-1-fdr-680x502.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.

  2. Ryan Hellyer
    Member
    Posted 2 years ago #

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

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

  3. I made a few changes to the server file in sites-enabled http://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.

  4. Ryan Hellyer
    Member
    Posted 2 years ago #

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

    Edit: It seems Chris beat me to the punch.

Topic Closed

This topic has been closed to new replies.

About this Topic