Created
February 7, 2020 10:38
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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