Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix About nginx proxy sub_filter?

Discussion in 'Misc WordPress Requests' started by bearshang, Oct 25, 2017.

  1. bearshang


    About nginx proxy sub_filter?, by bearshang

    I used the sub_filter module to change the domain,
    All looks good, except for /wp-admin/admin-ajax.php link…

    That is when I visit the admin media library, all the requested picture url has not been sub_filter successful replacement, I do not know what is the reason, have to know?
    The following is my nginx proxy configuration:

    location / {
    proxy_pass http://s3.amazonaws.com;
    proxy_redirect off;
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Accept-Encoding "";
    proxy_connect_timeout 60;
    proxy_read_timeout 600;
    proxy_send_timeout 600;

    add_header Pragma public;
    add_header Cache-Control "public";
    log_not_found off;

    #filter img url
    sub_filter s3.amazonaws.com/adwords.yeahmobi.com 'sub.domain.com';
    sub_filter_once off;

    About nginx proxy sub_filter?

Share This Page

Web Hosting