Skip to content

Instantly share code, notes, and snippets.

@bjwschaap
Created March 29, 2019 12:07
Show Gist options
  • Save bjwschaap/f0c0757fb17974e24bff139aa10cdc61 to your computer and use it in GitHub Desktop.
Save bjwschaap/f0c0757fb17974e24bff139aa10cdc61 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name 192.168.33.11;
root /usr/share/nginx/html;
index index.php index.html index.htm;
error_page 500 502 503 504 /50x.html;
error_log error error;
location / {
try_files $uri $uri/ =404;
}
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment