atoponce / d-note

Self destructing encrypted notes
Other
130 stars 43 forks source link

New installation - Internal Server error and no hashcash.db #40

Open karibuTW opened 10 years ago

karibuTW commented 10 years ago

Hi guys,

I followed the installation steps on my Debian server but was not able to have d-node running. I got the infamous 500 Internal Server Error.

I have even tried to give full access to the dnote folder (chown -R www-data:www-data) and even chmod 777, but no success.

Actually, I don't even have a hashcash.db .... At which step it is created? Any other idea on this issue?

Thank you!

atoponce commented 10 years ago

How are you installing the application? With Apache or Nginx? Are you using WSGI, or something else to interpret the Python? Also, have you run the setup.py installation script? The hashcash.db will be automatically created on the first note. Also, there is no need to "chmod 777" anything. I would recommend making 'root' the owner of all the files and directories, and 'www-data' the group, and fully removing all permissions for the 'other' permission mode.

karibuTW commented 10 years ago

Hi Atoponce, I'm using Apache with WSGI Basically I've followed the installation steps on the readme.

I did run the setup.py too.

So not sure where is the issue is coming from...

atoponce commented 10 years ago

At install, and after running python setup.py, your directory tree setup should look like this: http://ae7.st/p/6wp (without the hashcash.db, actually). Your dnote.wsgi should be in the same root path as the dnote/ directory. Permissions should be as follows: http://ae7.st/p/6iy. The dnote.wsgi should be something like: http://ae7.st/p/5i0 (note that it's importing the dnote/__init.py__ module). Finally, for my Apache2 installation, here is the relevant section of my /etc/apache2/sites-enabled/default config file: http://ae7.st/p/7so. Make sure to reload Apache, so it loads in the config. You need libapache2-mod-wsgi installed, and the module loaded with a2enmod wsgi.

Hope that helps.

karibuTW commented 10 years ago

Sorry for such late reply. Unfortunately, I'm still not able to install it on my server. And may be I got some confusion there: In your virtualhost, you mention the variable <Directory /var/www/d>
But you don't have a folder called "d" Same thing for your dnote.wsgi

Also, on the official tutorial, we need to create the data folder manually (But I though the setup script would do it?) and for the permission, still on the same tutorial, there is: chmod g+w,o= root.www-data /var/www/data/dnote/data But no folder called /var/www/data (May be a typo)

So most probably I'm missing something...

After checking my logs I got: File "/var/www/dnote.wsgi", line 6, in from dnote import DNOTE as application ImportError: No module named dnote

Any idea?

karibuTW commented 10 years ago

Hi Atoponce and all, any suggestion? Thank you!

atoponce commented 10 years ago

Sorry. I've been swamped at work and personal life, and haven't had the time to help out here.

I'm not sure what problems your having, but I've successfully built this from scratch on an Apache virtual machine, with no problem, using the documentation outlined.

karibuTW commented 10 years ago

Hi Atoponce, Okay I'll try. By the way, in the documentation, there is: chmod g+w,o= root.www-data /var/www/data/dnote/data But I don't get the /var/www/data folder, where does it come from? Not written on the documentation I think. (An error?)

Thanks!

atoponce commented 10 years ago

I'll look into fixing the documentation, to make it a bit more agnostic. I'm guessing that is data that came from a copy/paste of an existing installation.

JacobTheEvans commented 9 years ago

Karibu was this ever resolved? I have run into the same issue I cannot find a fix. The tutorial and what atoponce have are not the same.

coloradotechie commented 6 years ago

I'm having the same issue... /var/log/apache2/error.log shows:

mod_wsgi (pid=4355): Target WSGI script '/var/www/dnote.wsgi' cannot be loaded as Python module.
 mod_wsgi (pid=4355): Exception occurred processing WSGI script '/var/www/dnote.wsgi'.
 Traceback (most recent call last):
   File "/var/www/dnote.wsgi", line 7, in <module>
     from dnote import DNOTE as application
ImportError: No module named dnote