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:
| <?php | |
| date_default_timezone_set('UTC'); | |
| // Create keys at hhttps://portal.aws.amazon.com/gp/aws/securityCredentials | |
| class AmazonClient { | |
| /** @var cURL */ | |
| public $curl; |
| 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 |
| 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 { | |
| 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; |
| #!/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 |
| #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/bash | |
| # Licensed to the Apache Software Foundation (ASF) under one | |
| # or more contributor license agreements. See the NOTICE file | |
| # distributed with this work for additional information | |
| # regarding copyright ownership. The ASF licenses this file | |
| # to you under the Apache License, Version 2.0 (the | |
| # "License"); you may not use this file except in compliance | |
| # with the License. You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| To get out of this condition without rebooting, you can trigger the OOM killer manually as follows: | |
| echo 1 > /proc/sys/kernel/sysrq | |
| echo f > /proc/sysrq-trigger | |
| echo 0 > /proc/sys/kernel/sysrq | |
| Ref : https://askubuntu.com/questions/845233/running-any-command-returns-cannot-allocate-memory-on-ubuntu-server |
| /** | |
| * Convert iframes to divs via ajax iframe_to_div jQuery Plugin | |
| * | |
| * Uses javascript to replace iframes with divs containing their source content | |
| * by loading via ajax. If you use this to load vanilla html snippets, this has the | |
| * effect of applying the page's css to your vanilla html snippet. | |
| * | |
| * This will not work if the iframe src is not a relative link due to ajax restrictions across domains. | |
| * | |
| * As an example: |