Difference between revisions of "Moodle Nginx Config"
Jump to navigation
Jump to search
Adam.birds (talk | contribs) (Created page with "'''Here is the Nginx Config for Moodle:''' <pre> upstream examplecombackend { server unix:/var/run/php-fcgi-examplecom.sock; } server { listen 80; listen 4...") |
Adam.birds (talk | contribs) |
||
Line 57: | Line 57: | ||
</pre> | </pre> | ||
+ | [[Category:Moodle]] | ||
[[Category:Nginx]] | [[Category:Nginx]] | ||
[[Category:Linux]] | [[Category:Linux]] | ||
[[Category:Contents]] | [[Category:Contents]] |
Latest revision as of 17:28, 30 April 2016
Here is the Nginx Config for Moodle:
upstream examplecombackend { server unix:/var/run/php-fcgi-examplecom.sock; } server { listen 80; listen 443 ssl; server_name example.com; root /var/www/vhosts/example.com/htdocs; ssl_certificate /etc/nginx/ssl/example.com.crt; ssl_certificate_key /etc/nginx/ssl/example.com.key; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers RC4-SHA:!HIGH:!ADH; location / { index index.html index.php; try_files $uri $uri/ @handler; expires 30d; } location /app/ { deny all; } location /includes/ { deny all; } location /media/downloadable/ { deny all; } location /pkginfo/ { deny all; } location /report/config.xml { deny all; } location /var/ { deny all; } location /. { return 404; } location @handler { rewrite / /index.php; } location /dataroot/ { internal; alias /var/www/vhosts/example.com/moodledata/; } include "ssl_offloading.inc"; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_index index.php; fastcgi_pass examplecombackend; include fastcgi_params; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } }