Update comments

Fixed a default NameVirtualHost problem

Signed-off-by: Teddysun <i@teddysun.com>
This commit is contained in:
Teddysun
2018-12-29 18:40:58 +09:00
parent cb7f6f5693
commit 1ea8142d0e
2 changed files with 5 additions and 4 deletions

View File

@@ -373,7 +373,7 @@ vhost_list(){
else
echo "Apache virtual host not found. You can create a new Apache virtual host with command: lamp add"
fi
ls ${apache_location}/conf/vhost/ | grep ".conf$" | grep -v "none" | sed 's/.conf//g'
ls ${apache_location}/conf/vhost/ | grep ".conf$" | grep -v "default" | sed 's/.conf//g'
}
vhost_del(){

View File

@@ -94,7 +94,6 @@ config_apache(){
mv ${apache_location}/conf/extra/httpd-vhosts.conf ${apache_location}/conf/extra/httpd-vhosts.conf.bak
mkdir -p ${apache_location}/conf/vhost/
touch ${apache_location}/conf/vhost/none.conf
cat > /etc/logrotate.d/httpd <<EOF
${apache_location}/logs/access_log ${apache_location}/logs/error_log {
@@ -112,9 +111,11 @@ EOF
cat > ${apache_location}/conf/extra/httpd-vhosts.conf <<EOF
Include ${apache_location}/conf/vhost/*.conf
<VirtualHost *:80>
EOF
cat > ${apache_location}/conf/vhost/default.conf <<EOF
<VirtualHost _default_:80>
ServerName localhost
ServerAlias localhost
DocumentRoot ${web_root_dir}
<Directory ${web_root_dir}>
SetOutputFilter DEFLATE