sopython Posted March 27, 2019 Posted March 27, 2019 I have tried the tutorial on wiki.helionet.org/Django, it works well. But now I want to deploy two Django apps on two subdomains on heliohost. I created two subdomians (e.g. Hello1 and Hello2), and the sub-folders Hello1 and Hello2 were created under public_html. Then I upload the Django apps to these subfolders and did the similar configurations to the .htaccess, dispatch.wsgi, etc separately. but it didn't work. Is there any tutorial for this kind of situation? Thanks!
wolstech Posted March 27, 2019 Posted March 27, 2019 I don't know of any reason why it shouldn't work, but nobody's ever asked this before. Django in general can be a bit of a pain though. Lets see if Krydos knows how to do this (I would've done the same thing as you, just modified the paths).
Krydos Posted March 27, 2019 Posted March 27, 2019 I don't see anything called Hello1 and Hello2 on your account. Did you delete them already?
sopython Posted March 28, 2019 Author Posted March 28, 2019 Yes, I have deleted Hello1&2, now there is one subdomain, it is pyStone. It still doesn't work.
Krydos Posted March 28, 2019 Posted March 28, 2019 So, do you want your django app to exist at http://pystone.sopython.heliohost.org/ or http://pystone.sopython.heliohost.org/pyStone/ or somewhere else?
sopython Posted March 28, 2019 Author Posted March 28, 2019 I want the django app to exist at http://pystone.sopython.heliohost.org/
Krydos Posted March 28, 2019 Posted March 28, 2019 You had a lot of things going on that were wrong. Rather than try to fix them all I just started you over fresh. http://pystone.sopython.heliohost.org/ As is always a good idea when debugging and developing make small changes and test it frequently to make sure your updates aren't breaking it. Let us know if you have any questions.
sopython Posted March 29, 2019 Author Posted March 29, 2019 Thank you Krydos. I will try to change it gradually.
sopython Posted March 29, 2019 Author Posted March 29, 2019 Hi Krydos, I did the following changes:1) create a sub-folder pyStone under pyStone2) move dispathc.wsgi , urls.py and settings.py into the new pyStone3) update the .htaccess (add pyStone in the path) Then the failure raised again, and the error info is:[Fri Mar 29 15:57:40.169951 2019] [wsgi:error] [pid 27149:tid 140458021799680] [client 58.33.178.52:51715] File "/home1/sopython/public_html/pyStone/pyStone/dispatch.wsgi", line 9, in <module>[Fri Mar 29 15:57:40.169519 2019] [wsgi:error] [pid 27149:tid 140458021799680] [client 58.33.178.52:51715] mod_wsgi (pid=27149): Exception occurred processing WSGI script '/home1/sopython/public_html/pyStone/pyStone/dispatch.wsgi'.[Fri Mar 29 15:57:40.169458 2019] [wsgi:error] [pid 27149:tid 140458021799680] [client 58.33.178.52:51715] mod_wsgi (pid=27149): Target WSGI script '/home1/sopython/public_html/pyStone/pyStone/dispatch.wsgi' cannot be loaded as Python module.[Fri Mar 29 15:57:40.168364 2019] [wsgi:info] [pid 27149:tid 140458021799680] [client 58.33.178.52:51715] mod_wsgi (pid=27149, process='', application='pystone.sopython.heliohost.org|/pystone/dispatch.wsgi'): Loading WSGI script '/home1/sopython/public_html/pyStone/pyStone/dispatch.wsgi'.
sopython Posted March 30, 2019 Author Posted March 30, 2019 Actually, there is no strong reason, I just want to organize the code. So forget about it, I think I can work on current directory tree. Thank you!
Recommended Posts