How to install Django (python) on Nginx

apt-get update
apt-get upgrade
apt-get install build-essential psmisc python-dev libxml2 libxml2-dev python-setuptools MYSQL-python
apt-get install python-pip
apt-get install virtualenv supervisor

Download and compile uWSGI:

cd /opt/
wget http://projects.unbit.it/downloads/uwsgi-latest.tar.gz
tar -zxvf uwsgi-latest.tar.gz
mv uwsgi-1.2.3/ uwsgi/
cd uwsgi/
python setup.py install
make 
Read the rest

Redirect Sub-Directory to Sub-Domain while retaining the links

Options -Indexes +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^indude.com [NC]
RewriteRule ^(.*)$ http://www.indude.com$1 [L,R=301]
RedirectMatch 301 ^/linux/(.*)$ http://linux.indude.com/$1

In this example I’m redirecting my visitors and spiders from subdirectory called “linux” to a sub-domain. The redirect is permanent (301), … Read the rest