老师,我在配置nginx 反向代理nodejs端口,这一节中有一个问题
来源:7-1 配置 Nginx 反向代理 Nodejs 端口
js商博良
2017-04-12
报的是unknon http 变量 的错误
我的conf文件如下,只是服务器的IP隐藏了
希望能得到老师的讲解,谢谢
3回答
-
Scott
2017-04-12
把这两个都注释掉:
# include /etc/nginx/conf.d/*.conf;
# include /etc/nginx/sites-enabled/*;
然后通过 sudo 来启动 Nginx 试试看呢?
另外,把 include /etc/nginx/conf.d/*.conf; 下面的文件代码也贴出来看下,我看 nginx.conf 的配置没什么问题,有点奇怪。
00 -
Scott
2017-04-12
把 /etc/nginx/nginx.conf 的内容贴一下,我看看怎么改
012017-04-12 -
js商博良
提问者
2017-04-12
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
##
# nginx-naxsi config
##
# Uncomment it if you installed nginx-naxsi
##
#include /etc/nginx/naxsi_core.rules;
##
# nginx-passenger config
##
# Uncomment it if you installed nginx-passenger
##
#passenger_root /usr;
#passenger_ruby /usr/bin/ruby;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}
00
相似问题