Skip to content

Instantly share code, notes, and snippets.

@udomsak
Created June 11, 2017 21:51
Show Gist options
  • Save udomsak/bb7057ed32bb62b64664fb074b8ad5a3 to your computer and use it in GitHub Desktop.
Save udomsak/bb7057ed32bb62b64664fb074b8ad5a3 to your computer and use it in GitHub Desktop.
server {
client_max_body_size 2000m;
client_body_buffer_size 128k;
server_name pumuki.example.com _;
root /home/www-user/domains/pumukit.example.com/public_html/web;
proxy_cache_bypass $nocache;
proxy_no_cache $nocache;
location / {
try_files $uri /app.php$is_args$args;
}
# PROD
location ~ ^/app\.php(/|$) {
fastcgi_pass unix:/cache/php-socket/php5-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS on;
fastcgi_param HTTP_X_REAL_IP $remote_addr;
fastcgi_param HTTP_X_FORWARDED_FOR $proxy_add_x_forwarded_for;
internal;
}
# Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
access_log off;
add_header Cache-Control "public, max-age=86400";
}
location ~* /playlist\.m3u8$ {
# Queries beginning with /img/ and then stops searching.
}
error_log /var/log/nginx/pumukit2_error.log ;
# access_log /var/log/nginx/pumukit2_access.log;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment