【发布时间】:2012-10-28 08:20:25
【问题描述】:
我是 Nginx 新手,我已经使用 this tutorial 设置了服务器。现在,当我添加指向其他站点的链接时,例如 http://www.anotherwebsite.com,并且当我从我的页面单击此链接时,服务器会将我定向到 http://www.mywebsite.com/http://www.anotherwebsite.com。服务器将另一个链接附加到我的网站链接。我该如何改变它。我调查过这些地方 How to redirect a url in NGINX, Rewrite to pretty links with nginx 但我就是不能让它工作。任何帮助将不胜感激。谢谢
server {
listen 80;
server_name $hostname;
location /static {
alias /var/www/<app-name>/static;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location / {
include uwsgi_params;
uwsgi_pass unix:/tmp/uwsgi.sock;
uwsgi_param UWSGI_PYHOME /var/www/<app-name>/env;
uwsgi_param UWSGI_CHDIR /var/www/<app-name>/project;
uwsgi_param UWSGI_MODULE <project-name>.wsgi:application;
}
}
【问题讨论】:
-
你当前的配置是什么样的?
标签: nginx