Deployer, nginx and custom wp-content folder
-
Hi, I believe I’m having a similar problem to this but presumably not exactly the same as that was resolved. I am also using deployer and have my wp-content path outside of the usual location (and named only ‘content’).
I’m using the following rules:
# WebP Express rules # -------------------- location ~* ^/?content/.*\.(png|jpe?g)$ { add_header Vary Accept; expires 365d; if ($http_accept !~* "webp"){ break; } try_files /content/webp-express/webp-images/doc-root/$uri.webp $uri.webp /content/plugins/webp-express/wod/webp-on-demand.php?xsource=x$request_filename&wp-content=content ; } # Route requests for non-existing webps to the converter location ~* ^/?content/.*\.(png|jpe?g)\.webp$ { try_files $uri /content/plugins/webp-express/wod/webp-realizer.php?xdestination=x$request_filename&wp-content=content ; }
These are the results of the three tests:
Testing redirection to existing webp
Bummer. Although we did get a webp, we did not get it as a result of a direct redirection.Enable redirection to converter?
This works.Create webp files upon request?
Sanity check FAILED for destination path: Path is outside resolved document root (/var/www/site/releases/6/public_html)Using the alternative rewrite approach (without try_file) causes the second test to fail also.
Any ideas welcome.
- The topic ‘Deployer, nginx and custom wp-content folder’ is closed to new replies.