Browse Source

change default vhost folder to app/web

Bachir Soussi Chiadmi 2 months ago
parent
commit
82ef2eb885

+ 1 - 1
assets/vhosts/drupal-ssl.nginxconf

@@ -12,7 +12,7 @@ server {
 
   server_name DOMAIN.LTD;
 
-  root /var/www/DOMAIN.LTD/app/public_html;
+  root /var/www/DOMAIN.LTD/app/web;
 
   #SSL Certificates
   ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

+ 1 - 1
assets/vhosts/drupal.nginxconf

@@ -2,7 +2,7 @@
 server {
     listen 80;
     server_name DOMAIN.LTD;
-    root /var/www/DOMAIN.LTD/app/public_html;
+    root /var/www/DOMAIN.LTD/app/web;
 
     charset utf-8;
 

+ 1 - 1
assets/vhosts/simple-phpfpm-ssl.nginxconf

@@ -12,7 +12,7 @@ server {
 
   server_name DOMAIN.LTD;
 
-  root /var/www/DOMAIN.LTD/app/public_html;
+  root /var/www/DOMAIN.LTD/app/web;
   index index.html index.php;
 
   charset utf-8;

+ 1 - 1
assets/vhosts/simple-phpfpm.nginxconf

@@ -2,7 +2,7 @@ server {
   listen 80;
   server_name DOMAIN.LTD;
 
-  root /var/www/DOMAIN.LTD/app/public_html;
+  root /var/www/DOMAIN.LTD/app/web;
   index index.html index.php;
 
   charset utf-8;

+ 1 - 0
bin/user.sh

@@ -40,6 +40,7 @@ adduser "$user"
 sed -i "s/$user:\/bin\/ash/$user:\/bin\/bash/g" /etc/passwd
 
 # TODO limiting su to the admin group
+yn="reset"
 while [ "$yn" != "y" ] && [ "$yn" != "n" ]
 do
   echo -n "Should we allow $user to su? [y|n] "

+ 3 - 3
bin/vhost.sh

@@ -87,11 +87,11 @@ fi
 cp "$_assets/vhosts/$_conffile" /etc/nginx/conf.d/"$_domain".conf
 sed -i -r "s/DOMAIN\.LTD/$_domain/g" /etc/nginx/conf.d/"$_domain".conf
 
-mkdir -p /var/www/"$_domain"/app/public_html
+mkdir -p /var/www/"$_domain"/app/web
 mkdir /var/www/"$_domain"/log
 
-cp "$_assets/vhosts/index.php" /var/www/"$_domain"/app/public_html/
-sed -i -r "s/DOMAIN\.LTD/$_domain/g" /var/www/"$_domain"/app/public_html/index.php
+cp "$_assets/vhosts/index.php" /var/www/"$_domain"/app/web/
+sed -i -r "s/DOMAIN\.LTD/$_domain/g" /var/www/"$_domain"/app/web/index.php
 
 #set proper right to user will handle the app
 chown -R www:www  /var/www/"$_domain"/