【发布时间】:2016-01-04 17:23:59
【问题描述】:
我有一个非常基本的 nginx 设置,但由于某种原因失败了;
server {
listen 80;
server_name librestock.com;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/david/StockSearch/stocksearch;
}
location / {
include proxy_params;
proxy_pass unix:/home/david/StockSearch/stocksearch/stocksearch.sock;
}
}
根据我读过的所有内容,我正在正确设置服务器名称。 当我用它工作的服务器的 ip 替换 librestock.com 时。
错误:
$ nginx -t
nginx: [emerg] invalid URL prefix in /etc/nginx/sites-enabled/stocksearch:12
nginx: configuration file /etc/nginx/nginx.conf test failed
【问题讨论】:
-
proxy_pass http://unix:/home/...
标签: nginx