Created
December 15, 2016 09:01
-
-
Save Strae/7618c2c7590b3c3f98cb258308986f17 to your computer and use it in GitHub Desktop.
Moodle 3.1 Nginx configuration
This file contains hidden or 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
server { | |
listen 80; | |
server_name [SERVERNAME]; | |
root [HTROOT-PATH]; | |
index index.php index.html index.htm; | |
location / { | |
# First attempt to serve request as file | |
try_files $uri $uri/index.php; | |
} | |
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 | |
# | |
location ~ [^/]\.php(/|$) { | |
fastcgi_split_path_info ^(.+?\.php)(/.+)$; | |
if (!-f $document_root$fastcgi_script_name) { | |
return 404; | |
} | |
fastcgi_param PATH_INFO $fastcgi_path_info; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_pass unix:[SOCKET-PATH]; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment