【发布时间】:2016-09-04 19:49:04
【问题描述】:
我是 nginx 和 Raspberry 的新手。
我使用
安装了 nginxsudo 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 /
我希望你能帮助我:)
【问题讨论】:
-
你能在默认文件中显示第 20 行吗?
-
正是下面的那一行 :location / 我试着写 ´}´ 但它不起作用。事实上我没有修改那个文件:/
标签: nginx raspbian raspberry-pi3