我将Camunda部署在Nginx反向代理后面的Docker容器中。当我访问 public enum TheEnem
{
One,
Two
}
/// <summary>
/// out means 'contravariant'
/// which means that if U : T then an ITheInterface<U> can be cast to an ITheInterface<T>
/// </summary>
public interface ITheInterface<out T> where T : IComparable
{
T First { get; }
T Second { get; }
}
public class TheClass : ITheInterface<TheEnem>
{
public TheEnem First { get; set; }
public TheEnem Second { get; set; }
public TheClass(TheEnem first, TheEnem second)
{
First = first;
Second = second;
}
}
class Program
{
static void Main(string[] args)
{
// There is no proble casting an enum member to IComparable.
TheEnem e = TheEnem.Two;
IComparable ec = e;
IComparable ecc = (IComparable)e;
TheClass a = new TheClass(TheEnem.One, TheEnem.Two);
// We can cast the outer type OK.
ITheInterface<TheEnem> i = a; // This doesn't need the 'out' -- we're not changing T.
// But not the iner one:
//ITheInterface<IComparable> c = a; // Cannot implicitly convert type TheClass' to 'ITheInterface<System.IComparable>'. An explicit conversion exists (are you missing a cast?)
// So let's cast explicitly:
ITheInterface<IComparable> c = (ITheInterface<IComparable>)a;
// Now we get an excpetion at runtime:
// Unable to cast object of type 'TheClass' to type 'ITheInterface`1[System.IComparable]
}
}
上的Camunda登陆页面时,该页面无法加载,并且在代理中得到以下日志:
localhost/app
要查找的172.24.0.1 - - [28/Apr/2020:12:14:49 +0000] "GET /app/ HTTP/1.1" 302 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.92 Safari/537.36" "-"
172.24.0.1 - - [28/Apr/2020:12:14:50 +0000] "GET /app/welcome/default/ HTTP/1.1" 200 3631 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.92 Safari/537.36" "-"
2020/04/28 12:14:50 [error] 26#26: *2 open() "/etc/nginx/html/lib/require.js" failed (2: No such file or directory), client: 172.24.0.1, server: localhost, request: "GET /lib/require.js HTTP/1.1", host: "localhost", referrer: "http://localhost/app/welcome/default/"
172.24.0.1 - - [28/Apr/2020:12:14:50 +0000] "GET /lib/require.js HTTP/1.1" 404 555 "http://localhost/app/welcome/default/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.92 Safari/537.36" "-"
文件存储在require.js
中。我试图重写两个在nginx配置中造成问题的网址,如下所示:
camunda/lib/require.js
但是它不起作用。我是重写URL的新手,我在做什么错了?