I am trying to use Nginx with django to run my server but when i try to run i get these WARNING:django.request:Not Found:
errors. normal python manage.py runserver
works fine. Also i used this tutorial. Any idea why i am getting these errrors and how to fix them?
Full Traceback
Not Found: /boaform/admin/formLogin
WARNING:waitress.queue:Task queue depth is 1
WARNING:django.request:Not Found: /boaform/admin/formLogin
Not Found: /robots.txt
WARNING:waitress.queue:Task queue depth is 2
WARNING:django.request:Not Found: /robots.txt
Not Found: /boaform/admin/formLogin
WARNING:waitress.queue:Task queue depth is 2
WARNING:django.request:Not Found: /boaform/admin/formLogin
Not Found: /.env
WARNING:waitress.queue:Task queue depth is 2
WARNING:waitress.queue:Task queue depth is 3
Not Found: /HNAP1/
WARNING:django.request:Not Found: /.env
WARNING:django.request:Not Found: /HNAP1/
WARNING:waitress.queue:Task queue depth is 3
Not Found: /HNAP1/
WARNING:waitress.queue:Task queue depth is 2
WARNING:waitress.queue:Task queue depth is 3
Not Found: /boaform/admin/formLogin
WARNING:waitress.queue:Task queue depth is 4
WARNING:django.request:Not Found: /boaform/admin/formLogin
WARNING:django.request:Not Found: /HNAP1/
WARNING:waitress.queue:Task queue depth is 5
Not Found: /.env
WARNING:django.request:Not Found: /.env
Not Found: /.env
WARNING:django.request:Not Found: /.env
Not Found: /assets/global/plugins/jquery-file-upload/server/php/index.php
WARNING:django.request:Not Found: /assets/global/plugins/jquery-file-upload/server /php/index.php
Not Found: /boaform/admin/formLogin
WARNING:waitress.queue:Task queue depth is 1
WARNING:waitress.queue:Task queue depth is 2
Not Found: /favicon.ico
WARNING:waitress.queue:Task queue depth is 3
WARNING:django.request:Not Found: /boaform/admin/formLogin
Not Found: /.env
WARNING:django.request:Not Found: /favicon.ico
Not Found: /robots.txt
WARNING:waitress.queue:Task queue depth is 4
WARNING:django.request:Not Found: /.env
WARNING:django.request:Not Found: /robots.txt
WARNING:waitress.queue:Task queue depth is 3
WARNING:waitress.queue:Task queue depth is 2
Not Found: /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php
WARNING:waitress.queue:Task queue depth is 3
Not Found: /boaform/admin/formLogin
WARNING:django.request:Not Found: /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php
WARNING:django.request:Not Found: /boaform/admin/formLogin
Not Found: /api/jsonws/invoke
WARNING:waitress.queue:Task queue depth is 4
WARNING:django.request:Not Found: /api/jsonws/invoke
WARNING:waitress.queue:Task queue depth is 3
WARNING:waitress.queue:Task queue depth is 3
WARNING:waitress.queue:Task queue depth is 4
WARNING:waitress.queue:Task queue depth is 5
WARNING:waitress.queue:Task queue depth is 6
Not Found: /boaform/admin/formLogin
WARNING:django.request:Not Found: /boaform/admin/formLogin
Not Found: /config/getuser
WARNING:django.request:Not Found: /config/getuser
Not Found: /boaform/admin/formLogin
WARNING:django.request:Not Found: /boaform/admin/formLogin
Not Found: /echo.php
WARNING:django.request:Not Found: /echo.php
Not Found: /echo.php
WARNING:django.request:Not Found: /echo.php
Not Found: /echo.php
WARNING:django.request:Not Found: /echo.php
Settings
ALLOWED_HOSTS = ['*']
rme_nginx.conf
# configuration of the server
server {
# the port your site will be served on
listen 80;
# the domain name it will serve for
server_name servername; # substitute your machine's IP address or FQDN
charset utf-8;
# max upload size
client_max_body_size 75M; # adjust to taste
# Django media
location /media {
alias https://bucket.amazonaws.com/media/; # your Django project's media files - amend as required
}
location /static {
alias https://bucket.amazonaws.com/; # your Django project's static files - amend as required
}
# Finally, send all non-media requests to the Django server.
location / {
proxy_pass http://localhost:8080; # See output from runserver.py
}
}
runserver.py
from waitress import serve
from myapp.wsgi import application
if __name__ == '__main__':
serve(application, host = 'localhost', port='8080')