我们正在配置自定义的nginx,同时验证我正遇到错误的nginx
nginx -t
nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
nginx: [warn] conflicting server name "gmottqa.test.att.com" on 0.0.0.0:8080, ignored
nginx: [warn] conflicting server name "gmottqa.test.att.com" on 0.0.0.0:8443, ignored
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
添加nginx配置文件以解决该问题,如果需要任何内容,请告诉我
cat nginx.conf
user nginx;
worker_processes auto;
error_log /opt/app/nginx/logs/error.log error;
pid /opt/app/nginx/run/nginx.pid;
events {
worker_connections 4096;
multi_accept on;
use epoll;
}
worker_rlimit_nofile 400000;
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
server_tokens off;
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 /opt/app/nginx/logs/access.log main;
keepalive_timeout 15;
keepalive_requests 1024;
client_header_timeout 15;
client_body_timeout 15;
send_timeout 15;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
# enable gzip compression
gzip off;
gzip_http_version 1.1;
gzip_vary on;
gzip_proxied any;
gzip_static on;
# end gzip configuration
include /opt/app/nginx/conf/conf.d/*.conf;
能请一些我检查过这个问题的地方
答案 0 :(得分:0)
我认为您正在使用Linux。
在/etc/nginx/sites-enabled
中,可能会留下temp
文件,例如,取决于您的编辑器。 default~
或文件可以命名为.save
或类似的名称。
只需运行$ ls -lah
即可查看不希望有哪些文件。
删除此文件,它应该可以解决您的问题。