A "static only" app can be given the option "expires max" to add far-future caching headers, but on a "symlink to static only" app the "extra info" is taken up with the path to link to. Is there any way to get the far-future expiry headers on a symlink to static only? (Of course I could do this through a "symlink to static/php" with a .htaccess. It just seems like the main use-case for the static-only serving is going to be things which need long-lived caching.) asked 25 Feb '12, 08:47 Neil de Cart... |
To do this, you will need to use a "symlink to static/cgi/php" and use .htaccess to set your directives. answered 25 Feb '12, 12:20 bmeyer71 ♦♦ doesn't this defeat the whole point of 'symbolic link to static only'? Isn't the main benefit in addition to it being fast (cos it uses Nginx (not Apache and no extra weight of having to interpret PHP) is that the files served are "static"... i.e. perfect for LONG "expires" headers, yet... we can't set any so get penalised from Google since this is one of their tests when choosing to rank sites.
(05 Feb '14, 12:13)
turgs
I believe this was posted before we added the "expires max" option
(05 Feb '14, 15:05)
bmeyer71 ♦♦
So it's still impossible to set expires max on a Symbolic link to static-only app, right? I have several symbolic links to static-only apps set up to serve media, but they don't have far-future expires. So do I need to set up new static-only apps (not symlinks) and move the content there and then mount them at the old location? Seems overly complicated. As turgs commented, the point of using these symbolic links to static-only apps is to increase speed and performance, but we take a hit from Google because of not having far-future expires.
(04 Jul '14, 16:17)
PeterA
Correct: at this time, it's still not possible to configure "expires max" for symlink apps.
(04 Jul '14, 16:32)
seanf
OK, would this be the procedure?
And does it matter if we delete the old directory or not? For example if the new app is mounted to mydomain.com/wp-content/uploads/ what happens if there are still files at /home/username/webapps/wordpress_app/wp-content/uploads/ ? Will they be ignored, or do I have to delete them?
(04 Jul '14, 17:44)
PeterA
What I recommend is:
This way, things will be the way WordPress expects them to be on the filesystem, so that files uploaded via Wordpress will go into the correct location.
(04 Jul '14, 18:00)
seanf
showing 5 of 6
show 1 more comments
|