server { listen 80; server_name IPアドレス; location /static { alias /usr/share/nginx/html/static; } location /media { alias /usr/share/nginx/html/media; } location / { proxy_pass http://127.0.0.1:8000; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; proxy_set_header X-Forwarded-Proto $scheme; } } 設定ファイルを保存したら、Nginxを再起動します。 sudo system
![ConoHa VPSにDjangoアプリをデプロイする方法【Nginx,Gunicorn】](https://cdn-ak-scissors.b.st-hatena.com/image/square/7abca6ee21736e0183893f8c8272af920464ad2e/height=288;version=1;width=512/https%3A%2F%2Fdenno-sekai.com%2Fwp-content%2Fuploads%2F2023%2F03%2Fconoha_vps_django07.png)