Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6650909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:56:52+00:00 2026-05-26T00:56:52+00:00

I am looking for a simple configuration to serve all files and directories inside

  • 0

I am looking for a simple configuration to serve all files and directories inside a particular folder.

To be more precise I am trying to serve everything inside the pinax /static_media/ folder and /media/ folder as it is with the same url, and preferably auto index everything .

by the way I have run python manage.py build_media --all so all static content is under <project_name>/site_media/static

The current configuration I am using :

server {
    listen   80;
    server_name  QuadraPaper;

    access_log  /home/gdev/Projects/QuardaPaper/access_log.log;

    location ^*/site_media/*$
    {
        autoindex on;
        access_log off;
        root /home/gdev/Projects/QuardaPaper/site_media;
    }

    location /media/ {
        autoindex on;
        root   /home/gdev/Projects/QuardaPaper/media/;
    }

All the different configuration instructions from various sites has really confused me , for example

How to serve all existing static files directly with NGINX, but proxy the rest to a backend server.

http://coffeecode.net/archives/200-Using-nginx-to-serve-static-content-with-Evergreen.html

https://serverfault.com/q/46315/91723

http://wiki.nginx.org/Pitfalls

http://pinaxproject.com/docs/0.7/media/#ref-media-devel

Environment information:

  • Xubuntu 10.04 running on VirtualBox
  • nginx 1.1.4
  • pinax 0.72
  • django 1.0.4
  • fastcgi for running django via nginx
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:56:53+00:00Added an answer on May 26, 2026 at 12:56 am

    I found the answer , It was Quite simple as i guessed .
    One has to set the root directory once and use the sub-directories as the location

    server {
        listen   80;
        server_name  QuadraPaper;
    
        access_log  /home/gdev/Projects/QuardaPaper/access_log.log;
        root /home/gdev/Projects/QuardaPaper;
    
        location /site_media/ {
            autoindex on;
            access_log off;
        }
    
        location /media/ {
            autoindex on;
        }
    }
    

    I got a clue from

    Nginx doesn't serve static

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Short: I am looking for a very simple (configuration/maintenance wise) solution, that would allow
Program I'm making has a simple configuration file looking something like this. @overlays =
I am building a plugin configuration application and I am looking for simple sample
Im looking for a simple solution to serialize and store objects that contain configuration,
As part of an attempt to generate a very simple looking sky, I've created
Ok, this is an embarassingly simple-looking problem, but is driving me crazy. I'm learning
I have a barcode scanner and laptop (ofcourse :)), I'm looking for simple event
Im looking for a simple bit of code that will let me add the
I'm looking for a simple solution using Python to store data as a flat
I'm looking for a simple line or two of code that will grab an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.