小编net*_*nel的帖子

如何将包含点的任何路径与nginx匹配?

我正在尝试使用Nginx配置实现代理

这个想法是让一个http服务器托管我的网站(我的SPA)。并使我的http服务器上的一条路由指向另一个api。

这是我下面的nginw配置文件

client_max_body_size 100M;

server {
    listen       80;
    server_name  localhost;

    root   /usr/share/nginx/html;
    index  index.html index.htm;

    location ^~ /proxyapi/ {
        proxy_read_timeout 180s;
        proxy_send_timeout 180s;
        proxy_pass http://localhost:5000/;
    }

    location ~* /static/* {
      try_files $uri =404;
      expires 1y;
      access_log off;
      add_header Cache-Control "public";
    }

    # Any route that doesn't have a file extension (e.g. /devices)
    location / {
        try_files $uri $uri/ /index.html;
    }

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = …
Run Code Online (Sandbox Code Playgroud)

nginx nginx-reverse-proxy nginx-config

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

找不到bootstrap-responsive.css

我想在我正在使用的小网站上使用bootstrap我正在使用bower添加我需要的每个客户端库(jquery,angular,bootstrap ...).我已经安装了bootstrap(使用bower安装),但我找不到(在下载的文件中)"bootstrap-responsive.css"文件.

我的问题是:是否有可能使用bower获取此文件,或者我必须以其他方式获取它(如下所述:bootstrap-responsive.css在哪里?)?

twitter-bootstrap twitter-bootstrap-3

3
推荐指数
1
解决办法
5591
查看次数

reason-ml这是一个类型推断问题?

我正在尝试理性并遇到一个我不明白的错误

这是我的代码:

let mult = (x:float, y:float):float => x * y;
Run Code Online (Sandbox Code Playgroud)

当我使用BuckleScript编译它时,我收到以下错误:

  We've found a bug for you!
  D:\1\bbl\orga\src\demo.re 1:40

  1 Ôöé let mult = (a:float, b:float):float => a * b;

  This has type:
    float
  But somewhere wanted:
    int

You can convert a float to a int with int_of_float.If this is a literal, you want a number without a trailing dot (e.g. 20).
Run Code Online (Sandbox Code Playgroud)

我不明白为什么编译器会需要打开一个floatint这里

types compiler-errors reason

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