我正在使用Shiny Server Pro托管我的Shiny应用程序,并希望创建身份验证以供用户访问。
由于我正在服务器上托管多个应用程序,并且我要为其创建身份验证的应用程序文件夹中没有conf文件。 因此,我从默认文件夹复制了conf文件,该文件放在闪亮的服务器上,并粘贴到此应用文件夹中,并替换了引用。
我运行下面的代码来创建用户名并得到以下错误。
# 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;
}
~
~
~