15
我有一個非常基本的nginx設置,由於某種原因失敗;Nginx無效的URL前綴
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/...' –
http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass – Deadooshka