Skip to content

Instantly share code, notes, and snippets.

View Swahjak's full-sized avatar

Peep van Puijenbroek Swahjak

View GitHub Profile
const someQuestion: CollectionConfig = {
slug: 'some-collection',
custom: {
cacheControl: 'public, max-age=300, stale-while-revalidate=300, stale-if-error=86400',
},
}
@Swahjak
Swahjak / nginx.conf
Last active November 9, 2017 16:13
Amazon AMI - PHP, NGIXN, Symfony
user www-data;
worker_processes 4;
pid /var/run/nginx.pid;
events {
worker_connections 2048;
multi_accept on;
use epoll;
}
server {
server_name *.amazonaws.com;
root /var/www/symfony/web;
location / {
# try to serve file directly, fallback to app.php
try_files $uri /app.php$is_args$args;
}
# PROD
location ~ ^/app\.php(/|$) {
[www]
user = www-data
group = www-data
listen = 0.0.0.0:9000
pm = dynamic
pm.max_children = 10
pm.start_servers = 2
[PHP]
date.timezone = Europe/Amsterdam
short_open_tag = off
max_execution_time = 300
max_input_time = 60
memory_limit = 256M