How to start django with apache

Hello,
I am very new and I just se a video to install Django.
The video show how to use the Django native server, but on my ubuntu, I install Apache2, mysql-server and phpmyadmin. I created a database and I imported a large database to work with it.

The video how that command

./manage.py runserver 127.0.0.1:8080

but the video do not speak about Apache. As I start Apache and localhost or 127.0.0.1 show an apache page, how can I have the result of ./manage.py runserver on apache2

Then my second question, as I installed mysql and I import a database, I suppose I should edit etting.py and change those lines

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': BASE_DIR / 'db.sqlite3',
    }
}

but how should I exactely change it? may be

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': BASE_DIR / 'db.dbname',
    }
}

Should I do it now?

About the command
./manage.py runserver 127.0.0.1:8080
I am confused because when I tyoe
http://127.0.0.1:8080/ on firefox, I can see the django page.

But during my first try, I have not installed Apache2 and mysql and I could see the django page.
As now Apache is installed, I supposed that Apache2 is not taken in consideration.

I am confused with Apache2. Right now, I wonder if Apache2 is desired? But I need it to use phpmyadmin to edit ma database. Does PHP (or apache) can leave togther with Django (python)?

Thanks

Deploying Django with a web server is one of the, if not the most, confusing parts of Django.

First, as a quick answer to one of the questions here, the runserver command is performing the same basic features as what Apache (or nginx) would perform. It is acting as a web server and then forwarding the appropriate requests to Django.

So you don’t use runserver with Apache - it’s used instead of Apache, in a development environment. (You would never want to use runserver for a production Django deployment.)

One of the reasons why Django deployment is such a confusing topic is the number of options you have for doing so. (While you can run Django in Apache - in a couple different ways - I haven’t done so in nearly 10 years. I’ve switched to nginx and have been extremely happy to have done so.)

To start to learn about deploying Django, start with the docs at How to deploy Django | Django documentation | Django.

Hello,
Thanks, then I should ignore apache, but I need it for phpmyadmin.
In other work, I can keep apache running on :80 and tun runserver on port :8080.
There is no conflict, that’s right?
I will contnu watching the video and read the doc. I beleive I will find the anser about the MySQL database.

Many thanks

If you’re talking about working in a development environment, where you’re working on building your application, yes that is correct.

Regarding your question about MySQL, see the docs at Databases | Django documentation | Django

Yes, in developping environnement. Thanks