Skip to content
Snippets Groups Projects
Commit 0bc058aa authored by ale's avatar ale
Browse files

Create cache/.htaccess at startup

In case it's a tmpfs.
parent 178b3787
No related branches found
No related tags found
No related merge requests found
Pipeline #54167 passed
#!/bin/sh
cache_dir=/opt/noblogs/www/wp-content/cache
if [ ! -e "$cache_dir/.htaccess" ]; then
mkdir -p $cache_dir
cat >"$cache_dir/.htaccess" <<EOF
Options -Indexes
Header set Vary "Accept-Encoding, Cookie"
Header set Cache-Control "max-age=300"
ExpiresActive On
ExpiresByType text/html A300
EOF
fi
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment