Struggeling setting up a simple welcome page with Apache Reverse Proxy

Hey Guys,

Iam rly struggling getting up my first Django Page. Iam rly new to django and it should be just a simple Page saying ‘under construction’ .

Iam trying to set it up with apache2 and reverse proxy configuration but after 4 hours browsing the web i found nothing that worked out for me .

My Server running Debian 11. Maybe someone can provide me with a good hint (Tutorial) ? Including certbot for https authentication?

ty

naseweis-io

Have you worked your way through the standard Django tutorial for the Django side of this?

Do you have a functional application without adding the Apache2 complexities into it?

Have you read How to deploy Django | Django documentation | Django?

How are you planning to run Django within Apache?

Are you expecting Apache to serve as the https endpoint?

Have you deployed other applications in Apache?

Hey, thx for the fast answer.
No i have no functional application yet. My main target was to configure apache.

At the moment iam running mailcow (docker mailserver) on it and it works fine on reverse proxy.

In the next few days i want to setup nextcloud on it to.

And than later in the days i want to setup a personal blog there and maybe other projects based on Django.

my goal was to configure apache2 for these goals as much as i could. But iam stuck at getting the vhost file workingfor Django. Django Page can be a one liner ‘under construction’.

I dont see any vhost configuration file for an apache2 in How to deploy Django | Django documentation | Django

neither there is no tutorial setting this up with https . Or iam just blind

Until you learn more about Django and how it’s deployed, direct and specific answers to those questions aren’t going to make sense. And saying that a Django “under construction” page is a “one-liner” makes me believe you don’t have any experience with Django yet.

Deploying Django in a production environment tends to be a very confusing topic, because there are multiple ways of doing just about anything, and different environments create different constraints.

The vhost configuration has less to do with Django, than with the application execution environment in which you’re going to run Django.

Yes, apache2 will work fine as a server for Django - I used it for a number of years. It’ll also serve as an https endpoint, which means Django doesn’t need to handle that at all.

True I have no experience with Django at all . But getting a first page running is not about understanding the framework.

Yea sure it does not its about setting it up in my apache. But thats were iam stuck. It feels less problematic to find a tutorial how to write a simple dev blog in django than publish it on a apache with reverse proxy configuration …

If you have so much experience with apache and django can you provide me with a sample vhost.conf file?

Actually, it is. Getting a first page running in Django is not about creating an html file and shipping it out to the browser. Getting a first page running in Django is about understanding how a URL is mapped to a view, and then using that view to generate a response.

Yes. But first, tell me which of the variety of deployment options for Django that you’re going to use. The answers are going to be different.

I think a Docker-Compose would be the best options for my needs