Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 would like to serve static files with nginx. i get static pages via wget and the root of the directory tree is page protocol. ie for :

    └── index.html

i would like to be able to serve pages like this : to render

what is the nginx configuration for this ?

update: i tried this : rewrite ^(.+)://(.+)$ $1/$2 last; but it doesn't work

share|improve this question
i think it is only because i'm not allowed to use :// in url :-) – jney Oct 24 '10 at 22:27

If I understand you right then you are most likely looking for a forward proxy like Squid, Nginx is a reverse proxy and is not really made for situations like this.

share|improve this answer
maybe there are better tools but for now i would like to limit my project to nginx. are you sure there is no way to do it with nginx ? – jney Oct 24 '10 at 19:12
Research what a forward proxy is, if that is indeed what you need then no you cannot do it with Nginx as it is written to be a reverse proxy only. – Martin Fjordvald Oct 24 '10 at 23:23

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.