-
-
Save mchaker/261efb3d7fe47a24b31e726c518d5536 to your computer and use it in GitHub Desktop.
Nginx Configuration for running Multicraft Panel
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 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