-
-
Save zaourzag/4fb71bf36e0676d38ff95c8ed747e66f 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 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