WordPress.org

Ready to get started?Download WordPress

Forums

Uploads by Proxy
[resolved] Not Working on Staging Server - NginX Issues? (2 posts)

  1. lampramirez
    Member
    Posted 5 months ago #

    Love, love, love this plugin. It's so useful for my day to day when developing locally.

    I am, however, having an issue getting it to work on my staging environment using a subdomain - separate machine/IP from production. I've set my wp-config.php with the following constants.

    define('WP_HOME', 'http://stage.website.com/');
    define('WP_SITEURL', 'http://stage.website.com/');
    define('UBP_SITEURL', 'http://website.com/');
    define('UBP_LIVE_DOMAIN', 'http://website.com/');
    define('UBP_IS_LOCAL', true );

    Seems like the 404_template hook isn't even firing. I'm running NginX, APC, Varnish and then also running Cloudflare on the production server (AWS Ubuntu - elastic IPs).

    Any help is greatly appreciated as I would love to be able to use this on staging.

    https://wordpress.org/plugins/uploads-by-proxy/

  2. Paul Clark
    Member
    Plugin Author

    Posted 2 months ago #

    Hmm... Sorry I'm seeing this so late! I don't see any issues in your configuration, and as far as I know, there aren't any conflicts with nginx.

    If the 404 template isn't firing, my first guess would be to check that permalinks are enabled (and that nginx rewrites are set up accordingly).

    Cloudflare shouldn't be an issue if it's set up on production only. It would block the 404 if on staging.

    APC could also block the 404 if there's a page cache occuring... Make sure no caching plugins are enabled on staging, and if that doesn't lead anywhere, try flushing the WordPress object cache. WP-CLI would be wp cache flush. PHP would be wp_cache_flush();

Reply

You must log in to post.

About this Plugin

About this Topic