2
との角度をサーブ私はUwsgiとnginxのジャンゴと同じnginxの設定ファイル
私の設定でセットアップジャンゴと角度アプリにしようとしています:
upstream django {
server unix:///home/deepankar/stuff/proj/server/project/mysite.sock; # for a file socket
}
# configuration of the server
server {
# the port your site will be served on
listen 80;
# the domain name it will serve for
server_name _; # 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 /path/to/your/mysite/media; # your Django project's media files - amend as required
}
location/{
root /home/deepankar/stuff/proj/client/build; # your Django project's static files - amend as required
try_files $uri $uri/ /index.html;
}
# Finally, send all non-media requests to the Django server.
location /api {
uwsgi_pass django;
include /etc/nginx/uwsgi_params; # the uwsgi_params file you installed
}
どのように私はすべて/ APIはにルーティングされることを確認してくださいuwsgi djangoサーバーと/
は、build
フォルダーの下にコンパイルされた角度アプリケーションにルーティングされます。