Skip to content

Instantly share code, notes, and snippets.

@petronetto petronetto/nginx.conf Secret
Last active Mar 1, 2018

What would you like to do?
user nginx;
worker_processes 2;
error_log /var/log/nginx/error.log;
pid /run/;
daemon off;
events {
worker_connections 1024;
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
server {
listen 80;
listen [::]:80 default ipv6only=on;
root /app/public;
index index.php;
access_log /dev/stdout main;
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
location ~ ^(.*)$ {
try_files $uri $uri/ /index.php?p=$uri&$args;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.