Jump to content

Recommended Posts

Posted

Hello,

I am new to Heliohost and already have a few problems.

 

First of all, I can't access cPanel. When I login to https://www.heliohost.org/login/ and use the "continue to cPanel" button, I end up on a loading error page. Is it because it needs a really good internet connection ? If so, what should I do, as I cannot get a better one for now ?

 
Secondly, I would like to host a Django application. I tried to follow the wiki-tutorial (https://wiki.helionet.org/tutorials/django), but all I get is a "basic hosting" of the files, and the app itself is not launched: when I go to my web address (mywebname.heliohost.us), I only get a list of the files and directories (db.sqlite3, manage.py, ...). If I host regular files (like .html files), I can access/see them without any problem.

- Do you see what I could have missed when uploading my django app ?

- What is the difference between the tutorial I followed (https://wiki.helionet.org/tutorials/django) and this one http://www.heliohost.org/classic/features/languages/python ? In particular, the second one says something about python's eggs, and that is not mentioned at all in the first one, so ... which is the "good" one ?

 

 

Thanks in advance for any answer, hoping that my English is not too horrid ...

Posted

First of all, I can't access cPanel. When I login to https://www.heliohost.org/login/ and use the "continue to cPanel" button, I end up on a loading error page.

It might be that you have port 2083 blocked. If port 2083 is blocked you still might be able to connect to cpanel using the insecure button at the bottom of the page, but then a hacker could intercept your data because it's not encrypted. We recommend finding a way to enable port 2083.

 

when I go to my web address (mywebname.heliohost.us), I only get a list of the files and directories (db.sqlite3, manage.py, ...)

It sounds like you forgot to create the .htaccess file.
Posted

Oh, perfect, you were right about the port ! Thanks for that.

 

 

I've got a .htaccess file, but I really am confused about it. My tree is like that :

home/
└─ username/
  └── public_html/
    ├── db.sqlite3
    ├── manage.py
    └── myproject/
      ├─.htaccess
      ├── dispatch.wsgi
      ├── __init__.py
      ├── __pycache__
      ├── settings.py
      ├── urls.py
      └── wsgi.py

 

My .htaccess :

RewriteEngine On
RewriteBase /
RewriteRule ^(media/.*)$ - [L]
RewriteRule ^(admin_media/.*)$ - [L]
RewriteRule ^(myproject/dispatch\.wsgi/.*)$ - [L]
RewriteRule ^(.*)$ myproject/dispatch.wsgi/$1 [QSA,PT,L]

As this configuration has no logic for me, I also tried to put the .htaccess file in /home/username/public_html/, but then I get a 500 error.

My Django app runs well in local.
 

Posted

Sorry, I simplified the tree to make the explanation clearer.

My project is named "visu_casu", and the other directories that already are on my account (mapApp, media, static) are sub-directories for this django project. Everything works well on a local server.

 

The contents of my directories are:

public_html:

db.sqlite3
manage.py
mapApp/
media/
static/
visu_casu/

 

visu_casu:

.htaccess
__init__.py
__pycache__/
asgi.py
dispatch.wsgi
settings.py
urls.py
wsgi.py
 

And for the files:

.htaccess

RewriteEngine On
RewriteBase /
RewriteRule ^(media/.*)$ - [L]
RewriteRule ^(admin_media/.*)$ - [L]
RewriteRule ^(visu_casu/dispatch\.wsgi/.*)$ - [L]
RewriteRule ^(.*)$ visu_casu/dispatch.wsgi/$1 [QSA,PT,L]

dispatch.wsgi / wsgi.py

import os, sys

sys.path.append("/home/braux/public_html/visu_casu")

from django.core.wsgi import get_wsgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'visu_casu.settings')

application = get_wsgi_application()
Posted

I fiddled with it and made a few changes for you http://visucasu.heliohost.us/

 

The main problem I saw is it looked like you were half following a guide to make your webroot a django app, and you were half following a guide to make a django app in a subdirectory. I flipped a coin and went with the assumption that maybe you wanted it set up as your webroot. It also needed a module named folium installed, and about a dozen other small changes. Now it's throwing a file not found error which I suspect is because it's trying to access /media/shp/basin.geojson instead of /home/braux/public_html/media/shp/basin.geojson. You should be able to take it from here.

Guest
This topic is now closed to further replies.
×
×
  • Create New...