Last active
December 23, 2015 15:09
-
-
Save vishwassharma/6654145 to your computer and use it in GitHub Desktop.
Revisions
-
vishwassharma revised this gist
Oct 3, 2013 . 1 changed file with 15 additions 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 @@ -0,0 +1,15 @@ #!/usr/local/bin/python2.7 import sys, os home_path = "/home/content/t/e/c/techbudconsult/" pyenv_path = "pyenv/lib/python2.7/site-packages" file_path = "swarjneeti/myproject" log_path = "swarjneeti/lot.txt" sys.path += [os.path.join(home_path, pyenv_path)] sys.path += [os.path.join(home_path, file_path)] os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings' from flup.server.fcgi import WSGIServer from django.core.handlers.wsgi import WSGIHandler WSGIServer(WSGIHandler()).run() -
vishwassharma revised this gist
Oct 3, 2013 . 2 changed files with 8 additions and 20 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,20 +0,0 @@ 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,8 @@ AddHandler fcgid-script .fcgi Options +FollowSymLinks RewriteEngine On RewriteBase / # everything else sent to django RewriteRule ^(dispatch.py/.*)$ - [L] RewriteRule ^(.*)$ dispatch.py/$1 [L] -
vishwassharma revised this gist
Oct 3, 2013 . 2 changed files with 43 additions 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 @@ -0,0 +1,23 @@ #!/usr/local/bin/python2.7 from traceback import format_exc import sys, os import site try: site.addsitedir("/home/content/t/e/c/techbudconsult/pyenv/lib/python2.7/site-packages") site.addsitedir("/home/content/t/e/c/techbudconsult/swarjneeti/meravote") # Add a custom Python path for your project #sys.path.insert(0, "/home/content/t/e/c/techbudconsult/swarjneeti/meravote") # Set the DJANGO_SETTINGS_MODULE environment variable. # This should match the name for the project you added to the path above os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' from django.core.servers.fastcgi import runfastcgi runfastcgi(method="threaded", daemonize="false") except Exception: open("/home/content/t/e/c/techbudconsult/swarjneeti/lot.txt", "w").write(format_exc()) raise 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,20 @@ #!/usr/local/bin/python2.7 from traceback import format_exc import sys import os import site home_path = "/home/content/t/e/c/techbudconsult/" pyenv_path = "pyenv/lib/python2.7/site-packages" file_path = "swarjneeti/meravote" log_path = "swarjneeti/lot.txt" try: site.addsitedir(os.path.join(home_path,pyenv_path)) site.addsitedir(os.path.join(home_path,file_path)) os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' from django.core.servers.fastcgi import runfastcgi runfastcgi(method="threaded", daemonize="false") except Exception: open(os.path.join(home_path,log_path), "w").write(format_exc()) raise -
vishwassharma revised this gist
Oct 3, 2013 . 1 changed file with 3 additions and 1 deletion.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 @@ -8,9 +8,11 @@ import site # sys.path.insert(0, '/home/vish0wass/local/lib/python2.6/site-packages') try: site.addsitedir('/home/vishwass/local/lib/python2.6/site-packages') site.addsitedir('/home/vishwass/website') os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings' from django.core.servers.fastcgi import runfastcgi runfastcgi(method="threaded", daemonize="false") except Exception: open("/home/vishwass/website/lot.txt", "w").write(format_exc()) raise -
vishwassharma revised this gist
Oct 3, 2013 . 1 changed file with 4 additions and 4 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 @@ AddHandler fcgid-script .fcgi Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule ^static/(.*)$ static/$1 [QSA,L] RewriteCond %{REQUEST_URI} !(myproject.fcgi) RewriteRule ^(.*)$ myproject.fcgi/$1 [QSA,L] -
vishwassharma revised this gist
Sep 22, 2013 . 1 changed file with 4 additions and 1 deletion.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,2 +1,5 @@ chmod 644 .htaccess chmod 744 dispatch.fcgi chmod 600 settings.py chmod 600 local_settings.py -
vishwassharma created this gist
Sep 21, 2013 .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,8 @@ AddHandler fcgid-script .fcgi Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule ^(media/.*)$ - [L] RewriteRule ^(adminmedia/.*)$ - [L] RewriteCond %{REQUEST_URI} !(dispatch.fcgi) RewriteRule ^(.*)$ dispatch.fcgi/$1 [L] 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,16 @@ #!/usr/bin/python2.6 from traceback import format_exc import sys import os import site # Make sure to change 'username' to your username! # sys.path.insert(0, '/home/vish0wass/local/lib/python2.6/site-packages') try: site.addsitedir('/home/vishwass/local/lib/python2.6/site-packages') os.environ['DJANGO_SETTINGS_MODULE'] = 'myproj.settings' from django.core.servers.fastcgi import runfastcgi runfastcgi(method="threaded", daemonize="false") except Exception: open("/home/vishwass/website/lot.txt", "w").write(format_exc()) raise 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,2 @@ chmod 644 .htaccess chmod 744 dispatch.fcgi