我有一个运行站点 abc.com 的 Django 应用程序,在前端使用 nginx。
URL:http ://abc.com/products/widget显示了小部件产品页面。我还希望 URL http://getwidget.com指向同一产品页面。我如何配置 nginx 来做到这一点?
我当前的 nginx 配置是这样的:
server {
listen 80;
server_name abc.com;
location / {
client_max_body_size 10M;
proxy_pass http://127.0.0.1:8200;
}
location /static/
{
root /home/projects/abc/static;
}
}