mango-cms 0.2.21 → 0.2.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.js +6 -6
- package/default/package.json +1 -1
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -397,7 +397,7 @@ function generateNginxConfig(settings, buildPath) {
|
|
|
397
397
|
|
|
398
398
|
server {
|
|
399
399
|
server_name ${settings.siteDomain};
|
|
400
|
-
root ${buildPath};
|
|
400
|
+
root ${buildPath.replace('/build', '/dist')};
|
|
401
401
|
index index.html;
|
|
402
402
|
|
|
403
403
|
# Serve static files directly
|
|
@@ -466,7 +466,7 @@ function generateApacheConfig(settings, buildPath) {
|
|
|
466
466
|
|
|
467
467
|
<VirtualHost *:80>
|
|
468
468
|
ServerName ${settings.siteDomain}
|
|
469
|
-
DocumentRoot ${buildPath}
|
|
469
|
+
DocumentRoot ${buildPath.replace('/build', '/dist')}
|
|
470
470
|
IndexIndex index.html
|
|
471
471
|
|
|
472
472
|
# Serve static files directly
|
|
@@ -511,8 +511,8 @@ async function configureWebServer(settings, buildPath) {
|
|
|
511
511
|
generateApacheConfig(settings, buildPath);
|
|
512
512
|
|
|
513
513
|
const configPath = webServer === 'nginx' ?
|
|
514
|
-
`/etc/nginx/sites-available/${settings.
|
|
515
|
-
`/etc/apache2/sites-available/${settings.
|
|
514
|
+
`/etc/nginx/sites-available/${settings.database.toLowerCase()}` :
|
|
515
|
+
`/etc/apache2/sites-available/${settings.database.toLowerCase()}.conf`;
|
|
516
516
|
|
|
517
517
|
try {
|
|
518
518
|
// Check if config already exists
|
|
@@ -525,7 +525,7 @@ async function configureWebServer(settings, buildPath) {
|
|
|
525
525
|
|
|
526
526
|
if (webServer === 'nginx') {
|
|
527
527
|
// Create symlink if it doesn't exist
|
|
528
|
-
const enabledPath = `/etc/nginx/sites-enabled/${settings.
|
|
528
|
+
const enabledPath = `/etc/nginx/sites-enabled/${settings.database.toLowerCase()}`;
|
|
529
529
|
if (!fs.existsSync(enabledPath)) {
|
|
530
530
|
execSync(`sudo ln -s ${configPath} ${enabledPath}`);
|
|
531
531
|
}
|
|
@@ -533,7 +533,7 @@ async function configureWebServer(settings, buildPath) {
|
|
|
533
533
|
execSync('sudo systemctl reload nginx');
|
|
534
534
|
} else {
|
|
535
535
|
// Enable apache site
|
|
536
|
-
execSync(`sudo a2ensite ${settings.
|
|
536
|
+
execSync(`sudo a2ensite ${settings.database.toLowerCase()}`);
|
|
537
537
|
execSync('sudo systemctl reload apache2');
|
|
538
538
|
}
|
|
539
539
|
console.log(`${webServer} configuration has been updated and service reloaded`);
|
package/default/package.json
CHANGED