
我正在嘗試將樹莓派設定為果凍媒體伺服器。
我想從我擁有的網域透過網路存取該設備。
我已按照果凍說明進行操作用於設定 nginx conf 檔案。說明表明我應該在/etc/nginx/conf.d/jellyfin.conf
.但是,它們沒有表明我下一步該做什麼。我假設 nginx 只是「知道」在其目錄中查找自訂conf文件conf.d
,但如果我這樣做sudo service nginx start
,我就看不到我期望的結果(一個有效的反向代理)。話又說回來,我也不太確定如何調試。
如果我這樣做sudo nginx -t
我得到
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
所以,我想這意味著我的自訂conf檔案沒有被拾取?但是,如果我嘗試做
nginx -t /etc/nginx/conf.d/jellyfin.conf
我收到錯誤:
nginx: [emerg] "server" directive is not allowed here in /etc/nginx/conf.d/jellyfin.conf:2
不管怎樣,這不一定是我想做的:我希望 nginx 作為服務運行,因為我也不知道如何退出 SSH,而不關閉從給定終端啟動的程式。
如何讓 nginx 服務取得我的自訂conf檔?