This document has now been incorporated into the uWSGI documentation:
http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html
Steps with explanations to set up a server using:
| #change it to latest version | |
| #NGX_VERSION=1.12.0; | |
| NPS_VERSION=1.11.33.4; | |
| echo "Changing Directory to $HOME..." | |
| cd $HOME; | |
| echo "Nginx version to install: " && \ | |
| read NGINX_VERSION && \ | |
| echo "Downloading nginx-$NGINX_VERSION..." && \ | |
| wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz && \ |
| #!/bin/sh | |
| # | |
| # Script to prepare and restore full and incremental backups created with innobackupex-runner. | |
| # | |
| # This script is provided as-is; no liability can be accepted for use. | |
| # | |
| # UPDATE: 21/11/2015 | |
| INNOBACKUPEX=innobackupex | |
| INNOBACKUPEXFULL=/usr/bin/$INNOBACKUPEX |
| server { | |
| listen 80; | |
| #listen [::]:80 default_server ipv6only=on; | |
| ## Make site accessible from world web. | |
| server_name mailwizz.dev www.mailwizz.dev; | |
| ## Log Settings. | |
| access_log /var/log/nginx/mailwizz.dev_access.log; | |
| error_log /var/log/nginx/mailwizz.dev_error.log error; |
| server { | |
| listen 80; | |
| #listen [::]:80 default_server ipv6only=on; | |
| ## Make site accessible from world web. | |
| server_name mautic.dev www.mautic.dev *.mautic.dev; | |
| ## Log Settings. | |
| access_log /var/log/nginx/mautic.dev_access.log; | |
| error_log /var/log/nginx/mautic.dev_error.log error; |
| server { | |
| # see: http://wiki.nginx.org/Pitfalls | |
| # see: http://wiki.nginx.org/IfIsEvil | |
| listen 80; | |
| root /app; | |
| index index.html index.htm index.php; | |
| error_page 404 /index.php; | |
| # Make site accessible from http://set-ip-address.xip.io |
| <?php | |
| date_default_timezone_set('UTC'); | |
| // Create keys at hhttps://portal.aws.amazon.com/gp/aws/securityCredentials | |
| class AmazonClient { | |
| /** @var cURL */ | |
| public $curl; |
| #!/usr/bin/python2 | |
| # | |
| # Youtube-upload is free software: you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation, either version 3 of the License, or | |
| # (at your option) any later version. | |
| # | |
| # Youtube-upload is distributed in the hope that it will be useful, | |
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| #!/bin/bash | |
| # Bash Script to Install FFMPEG in Ubuntu 14.04 | |
| # Ref: http://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu | |
| # Opsional: install exiftool: apt-get install libimage-exiftool-perl | |
| # | |
| # Author: Edi Septriyanto http://masedi.net <hi@masedi.net> | |
| ######################################################################## | |
| CURDIR=$(pwd) |
| closure to generate hashed filename for Phalcon template compiled path kind of file: | |
| ```php | |
| <?php | |
| $volt->setOptions(array( | |
| 'compiledPath' => function($templatePath) { | |
| return md5($templatePath) . '.php'; | |
| } | |
| )); |