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 have a web application with one html page and erlang cowboy weber server. It launched at http://localhost:8800.

I have some css files at html page, with addresses like:

<link rel="stylesheet" type="text/css" href="static/css/bootstrap-responsive.min.css" />
<link rel="stylesheet" type="text/css" href="static/css/bootstrap-glyphicons.css" />

Also i startet nginx at http://localhost:9080/. Now i want that when user requests http://localhost:9080/app it returns index.html and all css/js files.

I configured proxy reverse at nginx as:

server {
        listen 9080;
        listen [::]:9080 default_server ipv6only=on;
        server_name localhost;

        location /app {
          proxy_pass      http://localhost:8800/app;


I got index.html but can't get css/js files, request url for css/js is:


and i'm getting 404 for this and i suggest that url must be:


The main problem that i can't include css/js files at index.html as:

<link rel="stylesheet" type="text/css" href="/app/static/css/bootstrap-glyphicons.css" />

because i don't know exactly name of app

Thank you.

share|improve this question
Have you tried location /static { proxy_pass http://localhost:8800/app; } ? –  Pothi Oct 23 '13 at 13:43

Your Answer


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

Browse other questions tagged or ask your own question.