我是 nginx 和 Raspberry 的新手。
我使用安装了 nginx
sudo apt-get 安装
那时一切都很好。当我尝试重新启动nginx时出现问题,它抛出了这个错误
nginx.service 的作业失败。有关详细信息,请参阅“systemctl status ngins.service”和“journaldtl -xn”
经过调查,我发现问题是下一个错误:
文件意外结束,期待“;” 或 /etc/nginx/sites-enabled/default:20 中的“}”
我的默认文件是:
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##
server {
#listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6
listen 80;
server_name $domain_name;
root /var/www;
index index.html index.htm;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# Make site accessible from http://localhost/
server_name localhost;
location /
我希望你能帮帮我 :)