我在通过vpn(openvpn)运行自托管的(arch服务器)nginx / shiny应用程序时遇到了麻烦。它的一部分显示在其他计算机上,但不显示传单/数据表对象。
在本地网络中工作正常。闪亮的网页本身有一个http链接,但显然传单(也可能是DT)使用https。
完全奇怪的是,对于在win10下使用openvpn的同事来说,它奏效了。
有人可以指出我要解决这个问题吗?
OS客户端: Ubuntu 18.04, openvpn 2.4.4-2ubuntu1;
OS服务器: Arch Linux nginx 1.14.0-1
R服务器: R版本3.5.1,x86_64-pc-linux-gnu 闪亮_1.1.0 leaflet_2.0.1
nginx.conf
user html;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
server_name localhost;
location / {
proxy_pass http://localhost:3838;
proxy_redirect http://localhost:3838/ $scheme://$host/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 20d;
proxy_buffering off;
}
shiny-server.conf:
# Instruct Shiny Server to run applications as the user "shiny"
run_as xyz;
# Define a server that listens on port 3838
server {
listen 3838;
# Define a location at the base URL
location / {
# Host the directory of Shiny Apps stored in this directory
site_dir /home/xyz/app;
# Log all Shiny output to files in this directory
log_dir /var/log/shiny-server;
# When a user visits the base URL rather than a particular application,
# an index of the applications available in this directory will be shown.
directory_index on;
}
}