Seite 1 von 1

bottle + wsgi

Verfasst: Montag 21. April 2014, 18:52
von djangofish
Hallo,

ich habe ein kleines Problem, ein WSGI-Skript wird nicht ausgeführt. Anstelle der Website wird einfach ein Directory-Listing ausgegeben. Das Skript lief vorher bereits auf einem RaspberryPi ohne Probleme. Jetzt musste ich ihn neu machen, und nun gibt es erstmal das Problem.
Das Skript ist ausführbar und hat Berechtigung 777 für Testzwecke.

hier meine Konfiguration:

Code: Alles auswählen

<VirtualHost *:80>

    ServerName raspberrypi
    ServerAlias rpi

    DocumentRoot /var/www/horstcontrol

    <Directory /var/www/horstcontrol>
    Order allow,deny
    Allow from all
    </Directory>

    WSGIScriptAlias /horstcontrol /www/var/horstcontrol/horst.wsgi

    <Directory /var/www/horstcontrol>
    Order allow,deny
    Allow from all
    </Directory>

</VirtualHost>

Für Hinweise bin ich dankbar

Re: bottle + wsgi

Verfasst: Dienstag 22. April 2014, 10:28
von BlackJack
@djangofish: Welche URL rufst Du denn auf? Bei einem ``http://rechnername_oder_ip/`` bekommst Du ``/var/www/horstcontrol`` aufgelistet. Über ``http://rechnername_oder_ip/horstcontrol`` sollte die Webanwendung ansprechbar sein.

Die Webanwendung sollte man ausserhalb des `DocumentRoot` ablegen, denn sonst kann man von aussen auf diese Daten zugreifen. Man kann zwar den `WSGIScriptAlias` so setzen, dass das Verzeichnis „dahinter versteckt” ist, das funktioniert allerdings nur so lange wie die Webanwendung läuft. Sollte es einen Konfigurationsfehler geben, ist die Webanwendung wieder herunterladbar. Und oft sind da dann auch Zugangsdaten zur verwendeten Datenbank dabei.

Re: bottle + wsgi

Verfasst: Dienstag 22. April 2014, 20:27
von djangofish
ich versuche die Application über 'http://rechnername_oder_ip/horstcontrol' aufzurufen. Bei `http://rechnername_oder_ip` kommt die Standardseite des Apache.

Re: bottle + wsgi

Verfasst: Dienstag 22. April 2014, 20:45
von djangofish
hab es jetzt nochmal überarbeitet und jetzt gehts erstmal so

Code: Alles auswählen

<VirtualHost *:80>
        ServerName      raspberrypi
        ServerAlias     192.168.200.38

    DocumentRoot    /var/www

        WSGIScriptAlias /               /var/www/horstcontrol/horst.wsgi
        WSGIDaemonProcess       horst    threads=4
        WSGIScriptReloading     Off


    <Directory /var/www>
        Order allow,deny
        Allow from all
    </Directory>

    <Directory /var/www/horstcontrol>
        WSGIProcessGroup horst
        WSGIApplicationGroup %{GLOBAL}
        Order deny,allow
        Allow from all
    </Directory>

</VirtualHost>