小编Dav*_*vid的帖子

Nginx目录(21:是目录)

我正在尝试nginx在 AWS Linux 上进行配置。我可以让它在一个站点上工作,但是当我尝试添加另一个站点时,我不断收到以下错误:

nginx: [crit] pread() "/home/ec2-user/public/sites/example.com" failed (21: Is a directory)
Run Code Online (Sandbox Code Playgroud)

这是我的nginx.conf

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;

events {
    worker_connections 1024;
}

http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;

    include             /etc/nginx/mime.types;
    include             /home/ec2-user/public/sites/*;
    default_type        application/octet-stream;

    include /etc/nginx/conf.d/*.conf;

    index   index.html index.htm;

    server {
        listen       80 default_server;
        listen       [::]:80 default_server;
        server_name …
Run Code Online (Sandbox Code Playgroud)

linux nginx amazon-web-services

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

amazon-web-services ×1

linux ×1

nginx ×1