Last active
          April 4, 2016 13:17 
        
      - 
      
 - 
        
Save kimus/bf0e1da81a1a129e46c0 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
kimus revised this gist
Jul 12, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -68,5 +68,6 @@ processes = 2 env = DJANGO_SETTINGS_MODULE=djangoapp.settings module = django.core.handlers.wsgi:WSGIHandler() home = /path/to/virtualenv touch-reload = /path/to/reload ```  - 
        
kimus revised this gist
Jul 12, 2014 . 1 changed file with 6 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ ## NGINX ```nginx server { server_name .example.com; root /srv/example.com/htdocs; @@ -15,7 +15,7 @@ server { > sudo apt-get install php5-fpm ``` ```nginx server { location ~ \.php$ { try_files $uri =404; @@ -33,7 +33,7 @@ server { > sudo apt-get install fcgiwrap ``` ```nginx server { location /cgi-bin/ { root /srv/example.com/cgi-bin; @@ -50,7 +50,7 @@ server { > sudo apt-get install uwsgi-plugin-python ``` ```nginx server { location / { uwsgi_pass 127.0.0.1:3031; @@ -60,12 +60,13 @@ server { ``` Configuration file example (uwsgi.ini) for uWSGI: ```ini [uwsgi] socket = 127.0.0.1:3031 master = true processes = 2 env = DJANGO_SETTINGS_MODULE=djangoapp.settings module = django.core.handlers.wsgi:WSGIHandler() home = /path/to/virtualenv ```  - 
        
kimus revised this gist
Jul 12, 2014 . 1 changed file with 12 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -44,7 +44,7 @@ server { } ``` ### uWSGI ```bash > sudo apt-get install uwsgi-plugin-python @@ -53,9 +53,19 @@ server { ``` server { location / { uwsgi_pass 127.0.0.1:3031; include uwsgi_params; } } ``` Configuration file example (uwsgi.ini) for uWSGI: ``` [uwsgi] socket = 127.0.0.1:3031 master = true processes = 2 env = DJANGO_SETTINGS_MODULE=djangoapp.settings module = django.core.handlers.wsgi:WSGIHandler() ```  - 
        
kimus revised this gist
Jul 12, 2014 . 1 changed file with 8 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ # Server Configurations ## NGINX ``` server { @@ -7,7 +9,7 @@ server { } ``` ### php5-fpm ```bash > sudo apt-get install php5-fpm @@ -25,7 +27,7 @@ server { } ``` ### fastcgi ```bash > sudo apt-get install fcgiwrap @@ -42,7 +44,7 @@ server { } ``` ### uWsgi ```bash > sudo apt-get install uwsgi-plugin-python @@ -55,4 +57,5 @@ server { include uwsgi_params; } } ```  - 
        
kimus revised this gist
Jul 12, 2014 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # NGINX ``` server { @@ -7,9 +7,9 @@ server { } ``` ## php5-fpm ```bash > sudo apt-get install php5-fpm ``` @@ -25,9 +25,9 @@ server { } ``` ## fastcgi ```bash > sudo apt-get install fcgiwrap ``` @@ -42,9 +42,9 @@ server { } ``` ## uWsgi ```bash > sudo apt-get install uwsgi-plugin-python ```  - 
        
kimus created this gist
Jul 12, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,58 @@ = NGINX = ``` server { server_name .example.com; root /srv/example.com/htdocs; } ``` == php5-fpm == ``` > sudo apt-get install php5-fpm ``` ``` server { location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } } ``` == fastcgi == ``` > sudo apt-get install fcgiwrap ``` ``` server { location /cgi-bin/ { root /srv/example.com/cgi-bin; fastcgi_pass unix:/var/run/fcgiwrap.socket; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } } ``` == uWsgi == ``` > sudo apt-get install uwsgi-plugin-python ``` ``` server { location / { uwsgi_pass 127.0.0.1:3101; include uwsgi_params; } } ```