Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 http://www.example.com/ :

http
└── www.example.com
    └── index.html

i would like to be able to serve pages like this : http://website.com/page/http://www.example.com/ to render http://website.com/page/http/www.example.com/

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

1 Answer 1

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

 
discard

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.