0 0

[nginx] 请教个nginx配置问题0

由于最近项目需要,需要配个nginx服务器. 下面是我瞎搞的配置:
		upstream 127.0.0.1
		{
			server 127.0.0.1:80;
		}
		
        server
        {
                listen 85;
                server_name http://127.0.0.1;
                index index.php index.htm;
                root /www/html/;
				location / 
				{
					proxy_pass http://127.0.0.1;
				}
				
                log_format access '$remote_addr - $remote_user
                [$time_local] "$request" '
                '$status $body_bytes_sent "$http_referer" '
                '"$http_user_agent" $http_x_forwarded_for';
                access_log /www/log/access.log access;
        }

需求:
nginx侦听85端口.  把请求转发给 http://127.0.0.1 (tomcat) 处理.
目前测试能够 正确下载到 tomcat 的index.html文件
但是nginx在启动的时候会报个警告,这有问题吗:
nginx: [warn] server name "http://127.0.0.1" has suspicious symbols in /etc/nginx/nginx.conf:61

另外, 我的实际需求是把请求转接到 2个servlet上. 我需要额外配置什么吗?

2014年6月22日 21:41
目前还没有答案

相关推荐

Global site tag (gtag.js) - Google Analytics