How to copy a Plone site to serve with nginx

I've been poking around with wget to grab a static copy of the site to serve it with nginx.

Googling around I found and so the command I've used is

wget --recursive --no-clobber --page-requisites --html-extension --domains

You can see the static copy at (though any links on that page are not rewritten to use

This does seem to grab everything correctly, but I've noticed that links to, say, the Things To Do, at are not correctly converted to use the .html, i.e.. you get an error 403 because the static URL should really be (and sure enough the venue.html page was grabbed by wget)

Plone is smart with its traversal... it just figures out that "venue#things-to-do" is not a directory but an anchor within a page.

Any suggestions on how to handle that sort of Plone URL with nginx?


OK, trying as per

# add .html to URI and serve file, directory, or symlink if it exists
if (-e $request_filename.html) {
  rewrite ^/(.*)$ /$1.html last;

Holy cr*p I think it works now :slight_smile:

1 Like

To identify broken links, I used this command:

wget --spider -o wget.log -e robots=off --wait 1 -r -p

It worked great... tracked down and fixed 40+ broken links!

Take a look at for a quite generally applicable option for turning a plone site static. He's written a script that takes care of a lot of the oddities. I used it recently to do a static backup of a site including the private parts. Some of the recent changes are my fault because of issues I encountered.:slight_smile:


I know I'm asking years later.
Out of curiosity why not httrack for this?

1 Like

Because I never thought of it? :slight_smile: looking now...

httrack is the tool for grabing websites.

Indeed! I don't know why I didn't think of it or run into it in my earlier searches.

I will shortly be static-ifying the and sites, so thx for your timely question, @pigeonflight!

1 Like

Maybe this would have been fun too?

1 Like

We are using this in a Plone 4.3.x site with a client and it works.