我尝试用openx配置多个站点。我已经从/ admin / sites / site添加了新站点,并且还添加了站点配置。
似乎我需要在可用站点下修改nginx配置,但我不知道新站点的根元素应指向何处
这是来自站点可用/ lms配置
位置〜^ / static /(?P. *){ 根/ edx / var / edxapp;
任何人都可以给我提示吗?
答案 0 :(得分:0)
找到了答案。必须更新sites-available / lms才能添加新域。
它必须添加新的服务器块
server {
server_name *.newdomain.com
# error pages
error_page 504 /server/server-error.html;
error_page 502 /server/server-error.html;
error_page 500 /server/server-error.html;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/newdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/newdomain.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
...
# Non-hashed files (there should be very few / none of these)
add_header "Cache-Control" $cache_header_short_lived always;
}
}