Nginx Redirect via Proxy, Rewrite and Preserve URL

First, you shouldn’t use root directive inside the location block, it is a bad practice. In this case it doesn’t matter though. Try adding a second location block: location ~ /some/path/(?<section>.+)/index.html { proxy_pass http://192.168.1.24/$section/index.html; proxy_set_header Host $host; } This captures the part after /some/path/ and before index.html to a $section variable, which is then used … Read more

WP API and Proxy

Using a proxy is important when you cannot store your authentication credentials securely. One encounters this problem when building single page applications with client-side JavaScript Frameworks like Angular or Ember. This blog entry by Alex Bilbie nicely summarises the issue. As a side project, involving a Angular/Ionic/Cordova application and WordPress, I’m building a proxy plugin … Read more

WordPress updates being blocked by proxy

WP_HTTP_Proxy () adds proxy support for http API. You can ask for the info if you don’t know already & put it into wp-config.php define(‘WP_PROXY_HOST’, ‘192.168.x.x’); define(‘WP_PROXY_PORT’, ‘8080’); define(‘WP_PROXY_BYPASS_HOSTS’, ‘localhost, www.example.com, *.wordpress.org’); Source: https://developer.wordpress.org/reference/classes/wp_http_proxy/ If username & password is mandatory then, add these lines too define(‘WP_PROXY_USERNAME’, ‘_username_’); define(‘WP_PROXY_PASSWORD’, ‘xxxxxxxxx’);