Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have setup a proxy for a site which works with the following nginx config:

server {
    listen 80;

    access_log /dev/null;
    error_log  /dev/null;

    location / {
        proxy_set_header  X-Real-IP       $remote_addr;

However on this there are also styles loaded from a subdomain ( which aren't going through my proxy, because it links to the original domain. Is there a way to also let those requests go to my proxy? Do I have to change the contents of the pages when serving it to let them also go through my proxy? If so: how? :) Or is there another (perhaps better) way?

share|improve this question
up vote 0 down vote accepted

I found a solution by replacing the URLs by doing the following in my config:

sub_filter '' '';
sub_filter_once off;
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.