Skip to content

Instantly share code, notes, and snippets.

@kawaii
Created February 7, 2020 10:38
Show Gist options
  • Save kawaii/ed2fbbf11309b8f635a623fa87abce8d to your computer and use it in GitHub Desktop.
Save kawaii/ed2fbbf11309b8f635a623fa87abce8d to your computer and use it in GitHub Desktop.
An nginx virtual host configuration file, for use with the MyBB Docker distribution.
upstream mybb {
server mybb:9000 weight=5;
}
server {
listen 80;
root /var/www/html;
index index.html index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ inc/ {
internal;
}
location ~ ^/(images|cache|jscripts|uploads)/ {
access_log off;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass mybb;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment