小编akh*_*wam的帖子

无效的HTTP_HOST标头:'localhost:90,localhost:90'.根据RFC 1034/1035,提供的域名无效

我正在尝试与Gunicorn一起配置nginx用于Django项目.nginx给我以下错误:

DisallowedHost at /
Invalid HTTP_HOST header: 'localhost:90,localhost:90'. The domain name provided is not valid according to RFC 1034/1035.
Run Code Online (Sandbox Code Playgroud)

这是我的nginx配置

    server {

        listen 90;
        listen [::]:90;

        server_name xxxx;

        location = /favicon.ico { access_log off; log_not_found off; }
        location /static/ {
            root /home/user/djangopro/djangoapp;
        }

        location / {
            include proxy_params;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $http_host;
            proxy_buffering off;
            proxy_redirect off;

            proxy_pass http://localhost:8200/;
        }
    }
Run Code Online (Sandbox Code Playgroud)

Gunicorn正在为该网站提供服务localhost:8200.谁能告诉我导致错误的原因是什么?

django nginx gunicorn

5
推荐指数
1
解决办法
1718
查看次数

通过异步和延迟属性提高页面速度

我需要在我的网页中提高页面速度.我阅读了很多关于使用asyncdefer attribute提高初始页面速度的内容.所有js脚本都在</body>标签上方定义.请在我的页面中建议如何有效地使用这些属性?

<html>
<head>

<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link rel="stylesheet" href="/static/css/style/mystyle.css"> 


</head>
<body>
<!--HTML content-->

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.10/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.10/angular-touch.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.10/angular-cookies.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.11.0/ui-bootstrap-tpls.min.js"></script>
<script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular-route.min.js"></script>

google analytics script

</body>
</html>
Run Code Online (Sandbox Code Playgroud)

javascript css html5 src

2
推荐指数
1
解决办法
3725
查看次数

仅在加载图像时才将阴影应用于图像?

仅当渲染图像时,我才需要为图像应用框阴影属性。如果未加载图像框阴影属性:则不应执行。这可能吗?

html javascript css

0
推荐指数
1
解决办法
111
查看次数

标签 统计

css ×2

javascript ×2

django ×1

gunicorn ×1

html ×1

html5 ×1

nginx ×1

src ×1