None-root URL does not work

74 views
Skip to first unread message

Tim Verhoeven

unread,
Aug 10, 2015, 6:47:15 AM8/10/15
to RatticDB
Hi

I'm trying to get a new RatticDB setup working. I've followed all the instructions and everything seems to be fine up to point when I try to reach the installation in my browser. I've setup Rattic to live under a folder and not in the root of the webserver because I need to integrate it with rest of our websites setup. The link it http://ip-of-server/password/

SSL will be added by our haproxy setup in the DMZ, so don't worry about that. But when I go the URL I get a 404 error (see attached selection_053.png). When I enable debug in the RatticDB config I get this explanation about the error:

Page not found (404)

Request Method: GET
Request URL: http://10.80.80.107/password/

Using the URLconf defined in ratticweb.urls, Django tried these URL patterns, in this order:

  1. ^password/
  2. ^password\/static\/(?P<path>.*)$

The current URL, , didn't match any of these.

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.



Does anyone have an idea what I'm missing here? This my local.cfg file:

[ratticweb]
debug = False
#debug = True
secretkey = <my key>
hostname = <ip-of-server>
timezone = Europe/Brussels
urlroot = /password/

[filepaths]
static = /var/www/html/password/static

[database]
engine = django.db.backends.postgresql_psycopg2
name = rattic
user = <db username>
password = <db password>
host = 127.0.0.1
port = 5432

[email]
from_email = <our default system email address>


And this is my rattic.conf part of the apache config:

Alias /password/robots.txt /var/www/html/password/static/robots.txt
Alias /password/favicon.ico /var/www/html/password/static/favicon.ico
AliasMatch ^/password/([^/]*\.css) /var/www/html/password/static/styles/$1
Alias /password/media/ /var/www/html/password/media/
Alias /password/static/ /var/www/html/password/static/

<Directory /var/www/html/password/static>
    #Order deny,allow
    #Allow from all
    Require all granted
</Directory>

<Directory /var/www/html/password/media>
    #Order deny,allow
    #Allow from all
    Require all granted
</Directory>

#WSGISocketPrefix run/wsgi
WSGIScriptAlias /password/ /var/www/html/password/ratticweb/wsgi.py
WSGIPassAuthorization On
WSGIDaemonProcess rattic processes=2 threads=25 home=/var/www/html/password/ python-path=/var/www/html/password display-name=%{GROUP}
WSGIProcessGroup rattic

<Directory /var/www/html/password/ratticweb>
    <Files wsgi.py>
        #Order deny,allow
        #Allow from all
        Require all granted
    </Files>
</Directory>


This is all running on a Centos 7 (fully up to date) setup with Postgresql as backend. SELinux is also enabled, but I don't see anything in the audit logs so I don' t think the problem is there. All the rest of the setup instructions and commands finished ok.

Does anyway have an idea what is wrong here?

Thanks,
Tim

Selection_053.png

Tim Verhoeven

unread,
Aug 11, 2015, 3:42:38 AM8/11/15
to RatticDB
On Monday, August 10, 2015 at 12:47:15 PM UTC+2, Tim Verhoeven wrote:

SSL will be added by our haproxy setup in the DMZ, so don't worry about that. But when I go the URL I get a 404 error (see attached selection_053.png).

Some more information. The links on the page visible in the screenshot are all like this:

http://<server ip>/password/password/cred/list/

So, somehow /password/ gets added twice, and this is for all links on that page.

Any suggestions?

Thanks, Tim

Justin Lim

unread,
Apr 21, 2016, 4:54:39 PM4/21/16
to RatticDB
Tim,

Were you able to find a solution to this ? its pretty much what i am trying to do as well and saw the same problem of the /xxx/ getting added multiple times.

David

unread,
Apr 25, 2016, 2:29:04 AM4/25/16
to RatticDB
Hi,

configure apache LogLevel ssl:debug, restart it and seeing where is the problem.

Perhaps, not good apache configuration.

Regards

Reply all
Reply to author
Forward
0 new messages