wordpress - 我在我的 nginx.conf 中添加了一个 HSTS 标头,现在它不会启动
问题描述
我在我的 nginx.conf 中添加了一个 HSTS 标头,现在它不会启动。我删除了它,然后尝试重新启动,没有运气。
systemctl 状态 nginx.service
nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/nginx.service.d
└─limits.conf
Active: failed (Result: exit-code) since Tue 2021-09-28 14:43:48 UTC; 13min ago
Process: 65187 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=1/FAILURE)
Sep 28 14:43:48 localhost systemd[1]: Starting A high performance web server and a reverse proxy server...
Sep 28 14:43:48 localhost nginx[65187]: nginx: [warn] "ssl_stapling" ignored, issuer certificate not found for certificate "/var/www/22222/cert/22222.crt"
Sep 28 14:43:48 localhost nginx[65187]: nginx: [emerg] "rewrite" directive is not allowed here in /etc/nginx/nginx.conf:109
Sep 28 14:43:48 localhost nginx[65187]: nginx: configuration file /etc/nginx/nginx.conf test failed
Sep 28 14:43:48 localhost systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Sep 28 14:43:48 localhost systemd[1]: nginx.service: Failed with result 'exit-code'.
Sep 28 14:43:48 localhost systemd[1]: Failed to start A high performance web server and a reverse proxy server.
(Ubuntu 20.04)
我没有备份 - 无论如何我可以在不丢失我的 WordPress 网站的情况下解决这个问题吗?
解决方案
推荐阅读
- javascript - Nativescript core cameraplus 与 Ml-kit 拍照问题
- android - 如何在 CMakeLists.txt 中添加新的源文件?
- react-native - Android webview链接在React Native中不起作用
- zend-framework2 - 如何在嵌套集合中使用一个表单字段集?
- angular - PrimeNG 自动完成更改表单数据模型
- sql - oracle更新sql查询
- windows - 从 10GB Informatica 会话日志中读取前 10 行的 Windows 批处理脚本
- r - R(ggplot)中的游泳者图:如何订购堆叠条?
- botframework - V4 Botframework ActionTypes.PostBack 在聊天中显示选定的选项
- c++ - QT Subdir - 未定义的参考