我在带有Nginx的ubuntu aws服务器上安装了https://jamesrwhite.github.io/minicron/的minicron,当我没有在位置指定目录时,主URL会按预期重定向到Cron页面。但是,如果我将'minicron'添加到该位置,如下所示,我得到“Sinatra不知道这个小曲”的错误。我迷路了,谷歌对这些问题都没有任何帮助。我的主要目标是让minicron加载到一个独立的子域或目录而不是主URL。任何帮助将不胜感激。
http{
...
server {
# The port you want minicron to be available, with nginx port 80
# is implicit but it's left here for demonstration purposes
listen 80;
# The host you want minicron to available at
server_name *.com;
location /minicron {
# Pass the real ip address of the user to minicron
proxy_set_header X-Real-IP $remote_addr;
# minicron defaults to running on port 9292, if you change
# this you also need to change your minicron.toml config
proxy_pass http://127.0.0.1:9292;
}
}
}