注意:部分文章发布时间较长,可能存在未知因素,购买时建议在本站搜索商家名称,先充分了解商家动态。
交流:唯一投稿邮箱:hostvps@88.com。
网友 j6hok*gfrr 说:
我实在太难了,我找不到配置文件第一行哪里出错了
**ot@NoteworthySphe**cal-VM:~# nginx -t
nginx: [emerg] &*uot;******&*uot; directive is not allowed here in /etc/nginx/nginx.conf:1
nginx: config**ation file /etc/nginx/nginx.conf **** failed
原帖 https://blog.**dn.net/lpwmm/article/details/116943**3
****** {
listen 80;
******_name localhost;
# 设置使用utf-8编码,防止中文文件名乱码
charset utf-8;
# 默认存放文件的路径
**ot /home/dav;
**th_basic realm_name;
# 用户密码文件存放位置
**th_basic_user_file /etc/nginx/.pa**words.list;
# dav 允许的*作
dav_methods PUT ****** MKCOL COPY MOVE;
dav_ext_methods PROPFIND OPTIONS;
# 创建文件的默认权限
dav_acce** user:rw g**up:rw all:r;
# 临时文件位置
client_body_temp_path /tmp;
# 最大上传文件限制, 0表示无限制
client_max_body_size 0;
# 允许自动创建文件夹(如果有需要的话)
******_full_put_path on;
}
网友 Liu`e 说:
**include的配置文件吧
网友 似毛非毛 说:
配置内容放错地方了吧?猜的。
网友 nebulabox 说:
只有 http { } 或者 stream {} 里面才能有******
网友 nebulabox 说:
给你举个最简单的例子
worker_p**ce**es 1;
***nts {
worker_connections 1024;
}
http {
include mime.types;
def**lt_type application/octet-stream;
sendfile on;
****** {
listen [::]:80 def**lt_****** ipv6only=off;
******_name xxx;
location / {
**ot html;
index index.html index.htm;
}
}
}
网友 Waylon 说:
人家为了省事只写了******那一段。
网友 天蓝星空 说:
楼上都是正解
网友 YorkZhao 说:
我直接caddy
网友 j6hok*gfrr 说:
Liu`e 发表于 2022-6-5 13:31
**include的配置文件吧
网友 j6hok*gfrr 说:
似毛非毛 发表于 2022-6-5 13:34
配置内容放错地方了吧?猜的。
网友 j6hok*gfrr 说:
nebulabox 发表于 2022-6-5 13:41
只有 http { } 或者 stream {} 里面才能有******
网友 j6hok*gfrr 说:
Waylon 发表于 2022-6-5 13:44
人家为了省事只写了******那一段。
网友 j6hok*gfrr 说:
location / {
**ot /home/dav;
index index.html index.htm;
**th_basic realm_name;
**th_basic_user_file /etc/nginx/.pa**words.list;
dav_methods PUT ****** MKCOL COPY MOVE;
dav_ext_methods PROPFIND OPTIONS;
dav_acce** user:rw g**up:rw all:r;
client_body_temp_path /tmp;
client_max_body_size 0;
******_full_put_path on;
}
nginx -t
提示这一行出错
dav_ext_methods PROPFIND OPTIONS;
去掉提示 500 Internal Server Er**r
网友 aru 说:
j6hok*gfrr 发表于 2022-6-5 15:55
location / {
**ot /home/dav;
index index.html index.htm;
贝壳主机网

