Nginx fastcgi with conditional cache purging setup


I am following your tutorial to set up Nginx + WordPress with fastcgi conditional cache purging.

I have followed the first 3 tutorials and have a working wordpress install with Nginx, mysql, php-fpm working.

I have gotten to the stage where I am trying to install the fastcgi_cache_purge module.

I get the following error when I run sudo apt-get install nginx-custom: Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: nginx-custom : Depends: nginx-common (= 1.2.4-1ppa4~precise) but 1.2.4-2ubuntu0ppa1~precise is to be installed E: Unable to correct problems, you have held broken packages.

Do you know how to fix this?




Try running apt-get remove nginx first to uninstall previously installed packages.

After that run apt-get update.

If you still face issues, then check apt-repos. There may be some extra repos added on your server.

It's still not working.

I am new to linux server admin. Where/how would I check apt-repos? Is there anything in particular that I should look out for that might be causing the problem?



These are the files that I found in /etc/apt/sources.list.d : brianmercer-nginx-precise.list ondrej-php5-precise.list nginx-stable-precise.list


Just thought I'd mention this too:

When I am on your tutorials page ( and I click the next page button or any of the page number buttons at the bottom of the page it takes me to this URL (

I think this might be a solution ( The comment gives the solution to a similar problem.

Let me know if this works or if you come up with a fix.



From /etc/apt/sources.list.d :

Try removing and nginx-stable-precise.list

Then run apt-get update and apt-get install nginx-custom


Regarding that pagination issue, that is not related to nginx config.

Actually, is a category archive. Its correct URL is

I think some fix on WordPress-side will solve it. If I come across any solution, I will let you know. :-)