python - How to run two django apps on same dev machine -


i'm trying run 2 separate django apps need communicate each other using restfull api. in real life there 2 separate machines during development i'm running 2 instances on different ports. trying anyway ...

one app running on 127.0.0.1:8000, , other on 127.0.0.1:9000. i've tried running both on localhost or 0.0.0.0 , other combinations keep getting these weird errors.

407 client error: proxy authorization required 

or

500 server error: inkapi error 

which far find apache error, or 403 forbidden

what correct way test 2 apps on same machine ?

there's no true one. try using nginx (althought works apache well, using appropiate syntax - should care general idea). define 2 fake domains domain1.dev , domain2.dev, , build appropiate entries:

server {     listen 80;     server_name domain1.dev;     location / {         proxy_pass http://127.0.0.1:8000/     } }  server {     listen 80;     server_name domain2.dev;     location / {         proxy_pass http://127.0.0.1:9000/     } } 

note, however, setup incomplete , should understand how nginx works. althought idea here conceptual , can with, also, apache. domains must correctly defined in /etc/hosts (or windows equivalent) work.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -