Setup Django in apache2 Raspberry Pi

Setup Django in apache2 Raspberry Pi. Example in this configuration for monitoring the server raspberry pi using https://github.com/k3oni/pydash/.

As following this configurations https://github.com/k3oni/pydash/wiki/Install-pyDash#3-setup-apache, how to setup it.

  • Edit in your:
/etc/apache2/sites-available/pydash.conf
  • and then, add this configuration:
Listen 192.168.1.27:8001

<VirtualHost *:8001>
    ServerName 192.168.1.27:80/pydash
    ServerAlias 192.168.1.27:8001
    DocumentRoot /var/www/pydash/
    WSGIDaemonProcess pydash display-name=%{GROUP} python-path=/var/www/pydash
    WSGIProcessGroup pydash
    WSGIScriptAlias / /var/www/pydash/pydash/wsgi.py
    Alias /static /var/www/pydash/static/
    Alias /media /var/www/pydash/media/
</VirtualHost>
  • Now restart or reload your apache
service apache2 restart

And then, you can access from another client with IP: 192.168.1.27:8001

Thanks to: Nabil Abdat

AM

Written by Agus Makmun Author

SDE Lead working across the whole stack: backend, frontend, databases and the infrastructure that ships them. These days mostly infrastructure and Next.js, like moving apps off Vercel and Supabase to self-hosted.

arrow_backPrevious post Adding BroadCast Mail to All Users Registered inside Django Admin
search esc