我以前也这样做过,并使用了以下指南:https://calvin.me/nginx-ldap-http-authentication/
不幸的是,最近该服务器出现了一些与nginx崩溃有关的重大问题(最近配置没有任何变化);
configuration file /etc/nginx/nginx.conf test failed\n',). Skipping.
/var/log/syslog.1:Nov 19 02:55:55 UB01 certbot[26093]: Error while running nginx -c /etc/nginx/nginx.conf -t.
/var/log/syslog.1:Nov 19 02:55:55 UB01 certbot[26093]: nginx: [emerg] unknown directive "ldap_server" in /etc/nginx/nginx.conf:35
/var/log/syslog.1:Nov 19 02:55:55 UB01 certbot[26093]: nginx: configuration file /etc/nginx/nginx.conf test failed
/var/log/syslog.1:Nov 19 02:55:57 UB01 certbot[26093]: Error while running nginx -c /etc/nginx/nginx.conf -t.
/var/log/syslog.1:Nov 19 02:55:57 UB01 certbot[26093]: nginx: [emerg] unknown directive "ldap_server" in /etc/nginx/nginx.conf:35
/var/log/syslog.1:Nov 19 02:55:57 UB01 certbot[26093]: nginx: configuration file /etc/nginx/nginx.conf test failed
/var/log/syslog.1:Nov 19 02:55:57 UB01 certbot[26093]: Attempting to renew cert (engtest.harrisisi.com) from /etc/letsencrypt/renewal/engtest.harrisisi.com.conf produced an unexpected error: The nginx plugin is not working; there may be problems with your existing configuration.
/var/log/syslog.1:Nov 19 02:55:57 UB01 certbot[26093]: The error was: MisconfigurationError('Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] unknown directive "ldap_server" in /etc/nginx/nginx.conf:35\nnginx: configuration file /etc/nginx/nginx.conf test failed\n',). Skipping.
grep: /var/log/unattended-upgrades: Is a directory
grep: /var/log/upstart: Is a directory
user@computer:~$ sudo nginx -t
nginx: [emerg] unknown directive "ldap_server" in /etc/nginx/nginx.conf:35
nginx: configuration file /etc/nginx/nginx.conf test failed我去查看nginx,发现ngx_http_auth_ldap_module.c的大小与我以前构建的相比有了很大的变化,所以我决定删除最新的所有内容,并对nginx及其模块进行最新的安装。不幸的是,当它击中nginx时,它似乎出了很大问题。我不知道接下来该怎么做。
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:3103:9: error: stray ‘\’ in program
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:3300:9: error: stray ‘\’ in program
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "http_auth_ld
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:3300:9: error: stray ‘\’ in program
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:3333:71: error: stray ‘#’ in program
#if (NGX_OPENSSL)
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:3373:71: error: stray ‘#’ in program
#endif
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:3381:9: error: stray ‘\’ in program
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "http_auth_ldap:
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:3397:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:3627:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:3727:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:3823:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:3911:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:4040:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:4106:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:4177:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:4270:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:4354:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:4543:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:4677:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:4764:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:4807:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:4858:72: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:4934:73: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:5010:73: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:5082:73: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:5154:73: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:5195:74: error: expected identifier or ‘(’ before ‘<’ token
};
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:5243:9: error: stray ‘\’ in program
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, #if (NGX_OPENSSL)
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:5309:72: error: stray ‘#’ in program
#endif
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:5396:73: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:5417:9: error: stray ‘\’ in program
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:5501:9: error: stray ‘\’ in program
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, ctx->r->connection->}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:5629:9: error: stray ‘\’ in program
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, }
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:5725:9: error: stray ‘\’ in program
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, }
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:5829:73: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:5843:72: error: stray ‘#’ in program
#if (NGX_OPENSSL)
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:5947:73: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:5951:72: error: stray ‘#’ in program
#endif
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:6024:9: error: stray ‘\’ in program
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, }
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:6226:72: error: stray ‘#’ in program
#if (NGX_OPENSSL)
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:6259:80: error: stray ‘#’ in program
#if OPENSSL_VERSION_NUMBER >= 0x10002000
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:6362:180: error: stray ‘#’ in program
"does not match address (neither server's domain nor IP in certificate's CN or SAN) "does not match address (neither server's domain nor IP in certificate's CN or SAN) fprintf(stderr, "DEBUG: SSL cert domain mismatch\n #endif
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:6455:73: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:6472:180: error: expected identifier or ‘(’ before ‘<’ token
{ ngx_http_auth_ldap_ssl_handshake_handler(conn, 1); }
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:6489:180: error: expected identifier or ‘(’ before ‘<’ token
{ ngx_http_auth_ldap_ssl_handshake_handler(conn, 0); }
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:6498:225: error: expected identifier or ‘(’ before ‘<’ token
typedef void (*ngx_http_auth_ldap_ssl_callback)(ngx_connection_t *conn);
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:6590:72: error: stray ‘#’ in program
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:6602:72: error: stray ‘#’ in program
#else
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:6614:72: error: stray ‘#’ in program
#endif
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:6650:72: error: stray ‘#’ in program
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:6658:72: error: stray ‘#’ in program
#else
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:6666:72: error: stray ‘#’ in program
#endif
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:6765:73: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:6769:72: error: stray ‘#’ in program
#endif
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:6875:72: error: stray ‘#’ in program
#if (NGX_OPENSSL)
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:6895:72: error: stray ‘#’ in program
#endif
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:6908:73: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:7084:9: error: stray ‘\’ in program
if (rc == LDAP_SERVER_DOWN && \
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:7406:9: error: stray ‘\’ in program
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, }
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:7601:9: error: stray ‘\’ in program
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, ngx_log_error(NGX_LOG_ERR, c->log, 0,
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:10029:9: error: stray ‘\’ in program
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:10102:73: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:10292:73: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:10461:73: error: expected identifier or ‘(’ before ‘<’ token
}
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:10488:12: error: missing terminating ' character [-Werror]
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:10488:7: error: missing terminating ' character
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:10508:31: error: expected identifier or ‘(’ before numeric constant
© 2018 GitHub, Inc.
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:10541:5: error: stray ‘\342’ in program
You can’t perform that action at this time.
^
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:10541:5: error: stray ‘\200’ in program
/home/user/nginx-auth-ldap//ngx_http_auth_ldap_module.c:10541:5: error: stray ‘\231’ in program
cc1: all warnings being treated as errors
objs/Makefile:1250: recipe for target 'objs/addon/nginx-auth-ldap/ngx_http_auth_ldap_module.o' failed
make[1]: *** [objs/addon/nginx-auth-ldap/ngx_http_auth_ldap_module.o] Error 1
make[1]: Leaving directory '/home/user/nginx-1.14.1'
Makefile:8: recipe for target 'build' failed
make: *** [build] Error 2
user@computer:~/nginx-1.14.1$发布于 2018-11-19 17:21:59
你在试图编译一个网页,而不是源代码。回到你拿到那个文件的地方,然后再试一次。
https://serverfault.com/questions/940736
复制相似问题