这段nginx哪里出错了?报 "server" directive is not allowed here in这个错误

Suu丶 2018-01-27 01:29:31
server {
listen 80;

root /www/web/ecanal/public_html;

server_name eyunhe.com www.eyunhe.com.cn;



error_page 400 /errpage/400.html;
error_page 403 /errpage/403.html;
error_page 404 /errpage/404.html;
error_page 503 /errpage/503.html;

location ~ \.php$ {
proxy_pass http://127.0.0.1:88;
include naproxy.conf;
}

location ~ .*\.(html|htm|gif|jpg|jpeg|bmp|png|ico|txt|js|css)$ {
root /www/web/ecanal/public_html;
expires 30d;
}



location ~ /\.ht {
deny all;
}

location / {
try_files $uri @apache;
}

location @apache {
internal;
proxy_pass http://127.0.0.1:88;
include naproxy.conf;
}
}
...全文
3140 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
chenjian026 2019-02-17
  • 打赏
  • 举报
回复
启动错配置文件了 应该启动nginx/nginx.conf文件而不是 conf.d/下的
Suu丶 2018-04-26
  • 打赏
  • 举报
回复
引用 1 楼 net_lover 的回复:
说server指令不适合放在这里,也就是语法错误。 检查下server{}外面的代码, 或者naproxy.conf的代码
孟子E章 2018-01-28
  • 打赏
  • 举报
回复
说server指令不适合放在这里,也就是语法错误。
检查下server{}外面的代码,
或者naproxy.conf的代码

10,606

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 其他
社区管理员
  • 其他
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧