has many :code_blocks

Random thoughts and postings to keep track of my learning process

Archive for the ‘nginx’ Category

Nginx Location block for moodle

leave a comment »


This is an example nginx location block for moodle if you want to access you moodle installation at a suburl; ie, http://yoursite/moodle. This example assumes that your moodle installation exists at /usr/share/moodle

location /moodle {
root /usr/share/;
index index.php index.html index.htm;
# moodle rewrite rules
#rewrite ^/(.*.php)(/)(.*)$ /$1?file=/$3 last;

location ~ ^/moodle/(.+\.php)$ {
root /usr/share/;
index index.php index.html index.htm;
rewrite ^/(.*.php)(/)(.*)$ /$1?file=/$3 last;
try_files $uri $uri/index.php;
#try_files $uri =404;
#root /usr/share/;
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
#fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
#fastcgi_index demo1.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}

#location ~* ^/moodle/(.+\.(jpg|jpeg|theme|gif|css|png|js|ico|html|xml|txt))$ {
#  root /usr/share/;
#}
} #location /moodle

 

references: http://www.scalescale.com/tips/nginx/nginx-moodle/

 

Advertisements

Written by Nick_k

05/07/2016 at 9:11 AM

Posted in moodle, nginx

Phpmyadmin on nginx

leave a comment »


Here’s a useful article on how to get phpmyadmin working under nginx

https://www.howtoforge.com/running-phpmyadmin-on-nginx-lemp-on-debian-squeeze-ubuntu-11.04

In case you want to reinstall phpmyadmin database on ubuntu, you can run:

sudo dpkg-reconfigure phpmyadmin and skip install for apache2/lighttpd

Written by Nick_k

01/10/2015 at 1:50 PM

Posted in nginx

WebSocket over Nginx

leave a comment »

Written by Nick_k

07/07/2014 at 12:45 PM

Interesting use of Rails…

leave a comment »

Written by Nick_k

04/07/2014 at 10:49 AM

Posted in Linux, nginx, ruby on rails

Cool nginx tutorials

leave a comment »

Written by Nick_k

10/10/2013 at 8:35 AM

Posted in nginx

Tagged with