[英]Nginx config error when using a Docker Container running the latest version of nginx from dockerhub (nginx:alpine)
我有一个 nginx 错误,我想知道为什么会发生这种情况,在 debian 10 服务器上,此配置运行良好,但在我的 alpine nginx docker 容器上却出现此错误
/etc/nginx # nginx -t
2020/01/17 18:13:06 [emerg] 189#189: unexpected "s" in /etc/nginx/sites-enabled/phpMyAdmin.conf:33
nginx: [emerg] unexpected "s" in /etc/nginx/sites-enabled/phpMyAdmin.conf:33
nginx: configuration file /etc/nginx/nginx.conf test failed
这是配置文件https://pastebin.com/CwELESRB这是出现错误的行
add_header Content-Security-Policy "frame-ancestors 'self'";
非常感谢任何帮助:D
我在您的指令中看到的唯一问题是分号的位置,它应该在引号内。
add_header Content-Security-Policy "frame-ancestors 'self';"
本页底部有一些示例。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.