我正在使用shiny server pro托管我的shiny应用程序,并希望为用户访问它创建身份验证。
我运行下面的代码来创建用户名,并得到以下错误。
# sudo /opt/shiny-server/bin/sspasswd /etc/shiny-server/myproject/passwd admin
错误:密码文件不存在;请使用-c创建它。
另外,下面是编辑文件夹名后conf文件中的代码。让我知道,如果在这个也需要任何变化。
# Instruct Shiny Server to run applications as the user "shiny"
run_as shiny;
# Specify the authentication method to be used.
# Initially, a flat-file database stored at the path below.
auth_passwd_file /etc/shiny-server/nashboard/passwd;
# Define a server that listens on port 3838
server {
listen 3838;
# Define a location at the base URL
location /nashboard {
# Only up tp 20 connections per Shiny process and at most 3 Shiny processes
# per application. Proactively spawn a new process when our processes reach
# 90% capacity.
utilization_scheduler 20 .9 3;
# Host the directory of Shiny Apps stored in this directory
site_dir /srv/shiny-server/nashboard;
# 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;
app_init_timeout 250 ;
}
}
# Provide the admin interface on port 4151
admin 4151 {
# Restrict the admin interface to the usernames listed here. Currently
# just one user named "admin"
required_user admin;
}
~
~
~