我是nginx和Raspberry的新手.
我用nginx安装了
sudo apt-get install
那一切都很好.当我尝试重新启动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 /
Run Code Online (Sandbox Code Playgroud)
我希望你能帮帮我 :)