-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NGINX configuration equivalent to .htaccess #55
Comments
Love it, thank you for preparing it! I'm currently restructuring the repo to separate WordPress from PHP – let's get it in once that's done. |
I was able to deploy WordPress Playground on an NGINX server. Here are the server directives confirmed to be working.
This config is copied also for the second subdomain serving the iframe contents. (Both domains point to the same directory where static files are deployed.) Just to note down while my experience is fresh, some of the difficulties were:
|
On this last point, I found there was already logic to apply a cache-busting URL for HTML files, but the regular expression was missing wordpress-playground/esbuild.js Line 255 in 233c66d
..should be something like: /(<script[^>]+src=")([^"]+)(" type="module"><\/script>)/ Edit: Addressed in pull request #108 |
After #712, the only two remaining .htaccess rules are:
I'd say that's as close as we can get here. I'm not aware of any What do you think @eliot-akira? I'm happy to reopen if needed. |
Would be nice to document the config syntax for using NGINX.
Here's
dist-web/.htaccess
for Apache.Rough draft for NGINX config (untested).
Reference
Rewrite /scope:.+/<URL> to just <URL>
Make wordpress.html configurable via query params
The text was updated successfully, but these errors were encountered: