Skip to content

Instantly share code, notes, and snippets.

@cloudrck
Last active November 10, 2020 15:01
Show Gist options
  • Save cloudrck/78796d0bcf2b16ada03a to your computer and use it in GitHub Desktop.
Save cloudrck/78796d0bcf2b16ada03a to your computer and use it in GitHub Desktop.
Nginx Configuration for running Multicraft Panel
upstream php5-fpm-sock {
server unix:/var/run/php5-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