0
0
Djangoframework~10 mins

Gunicorn as WSGI server in Django - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to run Gunicorn serving a Django project named myproject.

Django
gunicorn [1].wsgi
Drag options to blanks, or click blank then click option'
Amyproject
Bmanage
Csettings
Dapps
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'manage' instead of the project name.
Trying to run Gunicorn without specifying the WSGI module.
2fill in blank
medium

Complete the command to bind Gunicorn to listen on port 8000.

Django
gunicorn myproject.wsgi --bind [1]
Drag options to blanks, or click blank then click option'
A0.0.0.0:8000
Blocalhost:80
C127.0.0.1:22
D0.0.0.0:443
Attempts:
3 left
💡 Hint
Common Mistakes
Using port 80 or 443 which require root privileges.
Binding only to localhost which restricts external access.
3fill in blank
hard

Fix the error in the Gunicorn command to run with 4 worker processes.

Django
gunicorn myproject.wsgi --workers=[1]
Drag options to blanks, or click blank then click option'
A-4
Btwo
Czero
D4
Attempts:
3 left
💡 Hint
Common Mistakes
Using words like 'two' or 'zero' instead of numbers.
Using negative numbers for workers.
4fill in blank
hard

Fill both blanks to run Gunicorn with 3 workers and bind to localhost port 9000.

Django
gunicorn myproject.wsgi --workers=[1] --bind [2]
Drag options to blanks, or click blank then click option'
A3
B0.0.0.0:8000
C127.0.0.1:9000
D4
Attempts:
3 left
💡 Hint
Common Mistakes
Using 4 workers instead of 3.
Binding to 0.0.0.0 instead of localhost.
5fill in blank
hard

Fill all three blanks to run Gunicorn with 2 workers, bind to all interfaces on port 8080, and enable access log.

Django
gunicorn [1].wsgi --workers=[2] --bind [3] --access-logfile -
Drag options to blanks, or click blank then click option'
Amyproject
B2
C0.0.0.0:8080
Dmanage
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'manage' instead of the project name.
Binding to wrong IP or port.
Forgetting to specify workers.