I started with just the wsgi config lines, not the cgi. As I kept testing the possibility of things working, as desperate it sounds and looks stupid, I kept adding cgi config lines.
In one of the previous projects which I developed, I was using wsgi with apache2.2. The complete application worked. All links, DB connectivity, insertions and retrievals, web forms and reports on a web page. All static web pages. I did use import cgi and the same coding syntax in the python scripts. As posted earlier. Now I am looking to migrate the same application along with developing a new one to nginx+uwsgi (future on docker) .... and that is where I am facing this issue. WSGI quick start was one of the pages I referred while configuring the web server, with no luck. I buzzed the list after I just could not understand any way, what am I missing in configuring nginx or uwsgi or both. Now also Individual pages work, but when I click on submit on index page form, the subsequent page does not 'display', IT still shows the index form page albeit, blank (refresh / reloaded). So, what do I need to change in the config file(s) so that the complete application works as desired, on clicking the links / submit ? Please bear with me, I can be slow at times. Thanks On 20 October 2014 13:57, Roberto De Ioris <[email protected]> wrote: > >> Hi All, >> >> below are the nginx-uwsgi.conf and project.ini files >> >> q) Why does the new page not 'display' its content? >> >> in the top URL field, insertDB.py script file name appears... but the >> page content displayed is still of index.py page .. >> >> =============================== >> nginx-uwsgi.conf >> ----------------------- >> server { >> listen 81 default_server; >> server_name localhost; >> >> >> location / { >> root /home/nitin/project; >> index index.py index.html index.htm; >> } >> >> location ~ \.py$ { >> include uwsgi_params; >> uwsgi_modifier1 9; >> uwsgi_pass 127.0.0.1:9090; >> uwsgi_param UWSGI_PYHOME /home/nitin/project; >> autoindex on; >> include fastcgi_params; >> fastcgi_pass 127.0.0.1:9090; >> fastcgi_index index.py; >> fastcgi_param SCRIPT_FILENAME /home/nitin/project$fastcgi_script_name; >> } >> } >> >> #/etc/uwsgi --http :9090 --http-modifier1 9 --ini >> /homenitin/project/project.ini --master; >> >> >> =================== >> project.ini >> ---------------- >> [uwsgi] >> http-socket = :9090 >> http-modifier1 = 9 >> plugin = cgi >> chdir = /home/nitin/project/ >> #module = interface >> wsgi-file = index.py >> master = yes >> process = 3 >> thunder-lock = yes >> enable-threads = yes >> #exit-on-reload = true >> cgi = /home/nitin/project/ >> cgi-index = index.py >> cgi-allowed-ext = .py >> cgi-helper = .py=python >> offload-threads = 8 >> vacuum = true >> harakiri = 30 >> _______________________________________________ >> uWSGI mailing list >> [email protected] >> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi >> > > > Honestly your config is a bit non-sense :) > > You even bind two times on the same port, unfortunately in your previous > thread i was not able to understand what you are trying to accomplish: > > * do you have a clear view of the difference between CGI and WSGI ? > * do you want to write your app using the CGI or the WSGI approach ? (they > are at different level, so "both" is not an answer unless you mean you > have a bunch of CGI scripts that you want to host in the same instance on > which you are running a WSGI app too) > * have you fully (top-down) followed the whole quickstart ? > http://uwsgi-docs.readthedocs.org/en/latest/WSGIquickstart.html > > > -- > Roberto De Ioris > http://unbit.it > _______________________________________________ > uWSGI mailing list > [email protected] > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
