I am launching a Django application using gunicorn and nginx through AWS. I set up the gunicorn configurations with no errors. I created a new nginx configuration in /etc/nginx/sites-enabled
and I ran sudo nginx -t
to see test and I get the following errors:
nginx: [emerg] could not build server_names_hash, you should increase server_names_hash_bucket_size: 64
nginx: configuration file /etc/nginx/nginx.conf test failed
I uncommented the server_names_hash_bucket_size: 64
in nginx configurations at etc/nginx/nginx.conf
and this still does not change my error and I am not able to restart my server (I am trying to set up a supervisor to ensure gunicorn is always running in the background)
For reference:
django.conf:
server {
listen 80; server name 34.212.49.238;
location / {
include proxy_params;
proxy_pass http://unix:/home/ubuntu/Django_webapp/app.sock;
}
}
I also ran systemctl status nginx.service
:
I am a novice at server troubleshooting and really appreciate your help