Update 2026-06-23 10:40:10
This commit is contained in:
+5
-5
@@ -200,8 +200,8 @@ async function autoConfigureNginx() {
|
||||
if (!installed) {
|
||||
log.error('Nginx 自动安装失败');
|
||||
log.info('请手动安装 Nginx 后执行:');
|
||||
console.log(` ${colors.cyan}sudo cp deploy/nginx-idc.conf /etc/nginx/sites-available/idc${colors.reset}`);
|
||||
console.log(` ${colors.cyan}sudo ln -sf /etc/nginx/sites-available/idc /etc/nginx/sites-enabled/idc${colors.reset}`);
|
||||
console.log(` ${colors.cyan}sudo cp deploy/nginx-yunrui.conf /etc/nginx/sites-available/yunrui_asset${colors.reset}`);
|
||||
console.log(` ${colors.cyan}sudo ln -sf /etc/nginx/sites-available/yunrui_asset /etc/nginx/sites-enabled/yunrui_asset${colors.reset}`);
|
||||
console.log(` ${colors.cyan}sudo nginx -t && sudo systemctl restart nginx${colors.reset}`);
|
||||
return;
|
||||
}
|
||||
@@ -222,7 +222,7 @@ async function autoConfigureNginx() {
|
||||
wwwDir = '/www/wwwroot/idc';
|
||||
log.info('检测到宝塔面板 Nginx 环境');
|
||||
} else {
|
||||
wwwDir = '/var/www/idc';
|
||||
wwwDir = '/var/www/yunrui_asset';
|
||||
}
|
||||
|
||||
const distDir = path.join(__dirname, '..', 'frontend', 'dist');
|
||||
@@ -244,7 +244,7 @@ async function autoConfigureNginx() {
|
||||
|
||||
config.nginxRoot = wwwDir;
|
||||
|
||||
const configSource = path.join(__dirname, '..', 'deploy', 'nginx-idc.conf');
|
||||
const configSource = path.join(__dirname, '..', 'deploy', 'nginx-yunrui.conf');
|
||||
|
||||
if (!fs.existsSync(configSource)) {
|
||||
log.error('Nginx 配置文件不存在,请先运行安装脚本');
|
||||
@@ -282,7 +282,7 @@ async function autoConfigureNginx() {
|
||||
|
||||
if (useSitesAvailable) {
|
||||
log.info('创建站点软链接...');
|
||||
runCommand(`${sudoPrefix}ln -sf "${configDest}" /etc/nginx/sites-enabled/idc.conf`);
|
||||
runCommand(`${sudoPrefix}ln -sf "${configDest}" /etc/nginx/sites-enabled/yunrui_asset.conf`);
|
||||
|
||||
if (fs.existsSync('/etc/nginx/sites-enabled/default')) {
|
||||
log.info('删除默认站点配置...');
|
||||
|
||||
Reference in New Issue
Block a user