Skip to content

Instantly share code, notes, and snippets.

@zaourzag
Forked from cloudrck/multicraft.conf
Last active November 10, 2020 15:03
Show Gist options
  • Save zaourzag/4fb71bf36e0676d38ff95c8ed747e66f to your computer and use it in GitHub Desktop.
Save zaourzag/4fb71bf36e0676d38ff95c8ed747e66f 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 0.0.0.0;
root /var/www/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