Django and Staticgenerator


I am trying to use the staticgenerator for my django site.
The site contains only config for Nginx servers.
So, i followed this

But that config is not working in my Dreamhost PS, since the link contains only for apache-wsgi-django.
In Dreamhost, passenger is there.

The issue in all is that the static cache is getting generated but the files are recached every time i refresh my site.
Seems i need something to do in the Passenger level.

Can anyone help me in this pls?
If the staticgenerator works my site will handle 6000-7000 requests per sec.

Where are you putting the static files? They should be going into the “public” directory under the directory containing your passenger_wsgi script.

I installed it on the public folder only.
I gave the WEB_ROOT as /home/user/ in
the wsgi is in /home/user/

As i said the caching is happening but it re-caches everytime i refresh my website.
Actually, in my virtualhost,

# this tells apache to serve any file that match the request RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f # this tells apache to serve the index.html produced by StaticGenerator RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME}/index.html !-f RewriteRule ^/(.*)$ /home/user/$1 [QSA,L,PT]
I gave these code after the phpmyadmin rewrite.

Seems theres a rule somewhere after this that refetches the content making the cache overwritten everytime i refresh.

Was it right? If yes, then can it be said that which lines in the virtualhost entry does this?

Wait, what? That script is completely incorrect. Where did you get that from? If you’ve set up Django correctly using Passenger WSGI, you should not need any code in your .htaccess file at all, as Passenger automatically detects and uses static files in the “public” directory.

What i said was not in htaccess but in apache.conf
And if the rules are wrong what is the right way to tell passenger to use the static files generated by the staticgenerator?

You shouldn’t have to add anything. Passenger will automatically send files from the public directory if they exist, and fall back to hitting your application for files/paths that don’t exist in there.

Hi andrew,
But where is the public folder of passenger existing??

If you have set up Passenger correctly, there should be a directory called “public” in the domain directory.

ok thank you for your help.
i changed the WEB_ROOT for the staticgenerator to the DocumentRoot of my site.
Its working now.