change default vhost folder to app/web
This commit is contained in:
@@ -12,7 +12,7 @@ server {
|
|||||||
|
|
||||||
server_name DOMAIN.LTD;
|
server_name DOMAIN.LTD;
|
||||||
|
|
||||||
root /var/www/DOMAIN.LTD/app/public_html;
|
root /var/www/DOMAIN.LTD/app/web;
|
||||||
|
|
||||||
#SSL Certificates
|
#SSL Certificates
|
||||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name DOMAIN.LTD;
|
server_name DOMAIN.LTD;
|
||||||
root /var/www/DOMAIN.LTD/app/public_html;
|
root /var/www/DOMAIN.LTD/app/web;
|
||||||
|
|
||||||
charset utf-8;
|
charset utf-8;
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ server {
|
|||||||
|
|
||||||
server_name DOMAIN.LTD;
|
server_name DOMAIN.LTD;
|
||||||
|
|
||||||
root /var/www/DOMAIN.LTD/app/public_html;
|
root /var/www/DOMAIN.LTD/app/web;
|
||||||
index index.html index.php;
|
index index.html index.php;
|
||||||
|
|
||||||
charset utf-8;
|
charset utf-8;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ server {
|
|||||||
listen 80;
|
listen 80;
|
||||||
server_name DOMAIN.LTD;
|
server_name DOMAIN.LTD;
|
||||||
|
|
||||||
root /var/www/DOMAIN.LTD/app/public_html;
|
root /var/www/DOMAIN.LTD/app/web;
|
||||||
index index.html index.php;
|
index index.html index.php;
|
||||||
|
|
||||||
charset utf-8;
|
charset utf-8;
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ adduser "$user"
|
|||||||
sed -i "s/$user:\/bin\/ash/$user:\/bin\/bash/g" /etc/passwd
|
sed -i "s/$user:\/bin\/ash/$user:\/bin\/bash/g" /etc/passwd
|
||||||
|
|
||||||
# TODO limiting su to the admin group
|
# TODO limiting su to the admin group
|
||||||
|
yn="reset"
|
||||||
while [ "$yn" != "y" ] && [ "$yn" != "n" ]
|
while [ "$yn" != "y" ] && [ "$yn" != "n" ]
|
||||||
do
|
do
|
||||||
echo -n "Should we allow $user to su? [y|n] "
|
echo -n "Should we allow $user to su? [y|n] "
|
||||||
|
|||||||
+3
-3
@@ -87,11 +87,11 @@ fi
|
|||||||
cp "$_assets/vhosts/$_conffile" /etc/nginx/conf.d/"$_domain".conf
|
cp "$_assets/vhosts/$_conffile" /etc/nginx/conf.d/"$_domain".conf
|
||||||
sed -i -r "s/DOMAIN\.LTD/$_domain/g" /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
|
mkdir /var/www/"$_domain"/log
|
||||||
|
|
||||||
cp "$_assets/vhosts/index.php" /var/www/"$_domain"/app/public_html/
|
cp "$_assets/vhosts/index.php" /var/www/"$_domain"/app/web/
|
||||||
sed -i -r "s/DOMAIN\.LTD/$_domain/g" /var/www/"$_domain"/app/public_html/index.php
|
sed -i -r "s/DOMAIN\.LTD/$_domain/g" /var/www/"$_domain"/app/web/index.php
|
||||||
|
|
||||||
#set proper right to user will handle the app
|
#set proper right to user will handle the app
|
||||||
chown -R www:www /var/www/"$_domain"/
|
chown -R www:www /var/www/"$_domain"/
|
||||||
|
|||||||
Reference in New Issue
Block a user