Help with simple modification of nginx template

Hi there,
I have a client who is installing a podcasting plugin that requires some modifaction to the standard NGINX install.

What they sent me was this:

Please add this to NGINX Before Rule

# Seriously Simple Podcasting
rewrite podcast-download/([^/]+)/([^/]*)/? /index.php?podcast_episode=$1 break;
rewrite podcast-player/([^/]+)/([^/]*)/? /index.php?podcast_episode=$1&podcast_ref=player break;

So I made a copy of the NGINX/PHP FPM Wordpress tpl and stpl files as that is the base template I use but for the life of me, I don’t know where to put the code they sent me.

I know once that this is done, I have to rebuild the user.

Any help would be appreciated.

1 Like

Hi @tamerax,

I would try to put them as the first lines inside block location / {


Thank you!

Doesn’t seem to be fixing the issue the client is having with 404 errors so not if it isn’t in the right spot (i assume it is because that I believe in the main block).

Might be something else I guess.

Did you change it in both templates (tpl and stpl)?

Yes I did. Then assigned the new template to the user, pushed save and also ran v-rebuild-user [username here].

Reset their permalinks but sadly still getting the 404s.

Move the rewrites outside locations block, if that doesn’t work, I don’t know how to fix it, I should install a wordpress and the podcastng plugin to test the fix but I’ve no time to do that :frowning:


Didn’t work either. Thank you very much trying to assist me with it though!

1 Like