Comments (10)
I've added above the /
and php directives in my config:
from pilothouse.
Probably need to be smarter about the css/js files as then they get cached too long
from pilothouse.
@AaronHolbrook I'm confused as to why this is needed. Aren't static files already being served directly without involving PHP?
from pilothouse.
Okay, I did some investigating and I think it's if the file does not exist that it gets passed to PHP that you were referring to, so we definitely do need this. I also see a similar directive in the wordpress.org recommended Nginx configuration.
However, I wonder, since this is a development environment, would we want any of these files to be cached? Obviously we would want to cache these in production environments, but on dev I'm thinking it'd be better not to cache any of this.
from pilothouse.
Yea that's where I was torn, on one hand we don't want to be passing unrealistic requests like favicon.ico continually to the php backend, since during debugging that causes additional fake requests to come in, but on the other hand caching static assets could be very problematic to seeing changes.
from pilothouse.
Maybe we should add in the favicon.ico block like the codex has as well
from pilothouse.
https://codex.wordpress.org/Nginx#Global_restrictions_file
from pilothouse.
Good idea; done.
from pilothouse.
Hmmm; looks like the static file directive is conflicting with image proxying from production. Reopening to investigate that.
from pilothouse.
Proxying was working fine; but all static assets were being proxied. Now only proxying image files, and only image files in an uploads directory.
from pilothouse.
Related Issues (20)
- Allow placeholders in site-specific Nginx configuration file overrides
- Local domain request fails (from a sibling local site) HOT 8
- bcmatch package required by nova not available HOT 4
- Error on pilotehouse up -> Windows HOT 1
- Compatibility with Docker Compose 1.23.0+ HOT 2
- Check if Docker is running before attempting to start Pilothouse
- Add PHP 7.3 support HOT 3
- Add database create command
- Site directory with a space causes Nginx to abort
- Nginx site-specific configuration: Allow loading partials from site directory
- Add mailcatcher to the host's hosts file
- Only enable PHP containers for PHP versions that are in use by sites
- Don't add the WP_CACHE_KEY_SALT constant to generated wp-config.php
- Pull/update containers automatically when Pilothouse is installed/updated
- Change site-specific config file from config.yml to pilothouse.yml
- Keep pilothouse running across reboots
- Manifest Not Found HOT 3
- Feature request: change default option for new site
- Creating name of local site with dots "." HOT 1
- cannot get past installation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pilothouse.