Created
November 14, 2014 07:16
-
-
Save dangtrinhnt/92630609ad223accc81d to your computer and use it in GitHub Desktop.
Nginx configuration for Moodle 2.8
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 localhost; | |
| access_log /var/log/nginx/mdl_access.log; | |
| error_log /var/log/nginx/mdl_err.log; | |
| location / { | |
| root /var/www/moodle; | |
| index index.php index.html index.htm; | |
| rewrite ^/(.*.php)(/)(.*)$ /$1?file=/$3 last; | |
| } | |
| location ~ .php$ { | |
| root /var/www/moodle; | |
| try_files $uri =404; | |
| fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
| fastcgi_pass unix:/var/run/php5-fpm.sock; | |
| fastcgi_index index.php; | |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
| include fastcgi_params; | |
| fastcgi_buffer_size 128k; | |
| fastcgi_buffers 256 4k; | |
| fastcgi_busy_buffers_size 256k; | |
| fastcgi_temp_file_write_size 256k; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment