私はデジタル海に投げ込もうとしている簡単なジャンゴアプリを持っています。私は、ポートをプロキシして静的ファイルを提供するようにNGINXを設定しました。しかし、別のページに行くためにリンクをクリックすると、それは私の上に404です。それはインデックスページだけを正しく処理します。その他のものはすべて404です。Djangoはインデックスページのみを提供し、他のユーザーは404を表示します
バックエンドウィザードには、現在行っていること以外のdo/doがあります。
私は非常にNGINXですので、それを黙ってください:)感謝します。
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name localhost;
location /static {
alias /home/rchampin/ryan_the_developer_django/static;
}
location/{
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:8080;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
}
ありがとうございました! – Ryan