Giter Club home page Giter Club logo

Comments (10)

AaronHolbrook avatar AaronHolbrook commented on May 30, 2024

I've added above the / and php directives in my config:

from pilothouse.

AaronHolbrook avatar AaronHolbrook commented on May 30, 2024

Probably need to be smarter about the css/js files as then they get cached too long

from pilothouse.

philipnewcomer avatar philipnewcomer commented on May 30, 2024

@AaronHolbrook I'm confused as to why this is needed. Aren't static files already being served directly without involving PHP?

from pilothouse.

philipnewcomer avatar philipnewcomer commented on May 30, 2024

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.

AaronHolbrook avatar AaronHolbrook commented on May 30, 2024

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.

AaronHolbrook avatar AaronHolbrook commented on May 30, 2024

Maybe we should add in the favicon.ico block like the codex has as well

from pilothouse.

AaronHolbrook avatar AaronHolbrook commented on May 30, 2024

https://codex.wordpress.org/Nginx#Global_restrictions_file

from pilothouse.

philipnewcomer avatar philipnewcomer commented on May 30, 2024

Good idea; done.

from pilothouse.

philipnewcomer avatar philipnewcomer commented on May 30, 2024

Hmmm; looks like the static file directive is conflicting with image proxying from production. Reopening to investigate that.

from pilothouse.

philipnewcomer avatar philipnewcomer commented on May 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.