Skip to content

Instantly share code, notes, and snippets.

@mchaker
Forked from cloudrck/multicraft.conf
Last active September 28, 2019 03:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mchaker/261efb3d7fe47a24b31e726c518d5536 to your computer and use it in GitHub Desktop.
Save mchaker/261efb3d7fe47a24b31e726c518d5536 to your computer and use it in GitHub Desktop.
Nginx Configuration for running Multicraft Panel
upstream php7.2-fpm-sock {
server unix:/var/run/php/php7.2-fpm.sock;
}
server {
listen 80;
server_name minecraft.example.com;
root /srv/minecraft/multicraft/;
index index.php;
access_log /var/log/nginx/minecraft.example.com-access_log;
error_log /var/log/nginx/minecraft.example.com-error_log;
location / {
try_files $uri $uri/ =404;
}
location ~ ^/protected {
deny all;
}
location ~ ^/(.*\.php)$ {
fastcgi_pass php5-fpm-sock;
fastcgi_param SCRIPT_FILENAME $request_filename;
include /etc/nginx/fastcgi_params;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_index index.php;
fastcgi_pass php5-fpm-sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment