Below is my vhost file
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /home/websites/web-admin.bal.com
ServerName admin.bal.com
Serveralias *.admin.bal.com
ErrorLog /home/websites/logs/admin.bal.com-error_log
CustomLog /home/websites/logs/admin.bal.com-access_log combined
AccessFileName .htaccess
DirectoryIndex index.php index.html index.htm
<Directory /home/websites/web-admin.bal.com>
Order Allow,Deny
Allow from all
AllowOverride AuthConfig FileInfo Indexes Limit Options
Options +FollowSymLinks
DirectorySlash On
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteLogLevel 5
# RewriteLog "/home/websites/logs/admin.bal.com-rewrite_log"
RewriteCond %{HTTP_HOST} ^live.admin.bal.com$ [NC]
RewriteRule ^/(.*)$ http://admin.bal.com/$1 [NC,R,L]
RewriteCond %{HTTP_HOST} ^admin.bal.com$ [NC]
RewriteRule ^/(.*)$ /live/$1 [NC,L]
RewriteCond %{HTTP_HOST} ^(.*).admin.bal.com [NC]
# RewriteCond %{DOCUMENT_ROOT}/%1 !-d
RewriteCond %{DOCUMENT_ROOT}/%1 !-f
RewriteRule ^/(.*)$ http://admin.bal.com/$1 [NC,R,L]
RewriteCond %{HTTP_HOST} !^admin.bal.com$ [NC]
RewriteRule /robots.txt$ /home/websites/robots.txt [NC,L]
RewriteCond %{HTTP_HOST} ^(.*).admin.bal.com$ [NC]
RewriteRule ^/(.*)$ /%1/$1 [NC,L]
</IfModule>
<Files ~ "^\.(htaccess|htpasswd)$">
Order Deny,Allow
Deny from all
Satisfy All
</Files>
</VirtualHost>
But when I use safari to access admin.bal.com
I don't know why display Safari can't find the server
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /home/websites/web-admin.bal.com
ServerName admin.bal.com
Serveralias *.admin.bal.com
ErrorLog /home/websites/logs/admin.bal.com-error_log
CustomLog /home/websites/logs/admin.bal.com-access_log combined
AccessFileName .htaccess
DirectoryIndex index.php index.html index.htm
<Directory /home/websites/web-admin.bal.com>
Order Allow,Deny
Allow from all
AllowOverride AuthConfig FileInfo Indexes Limit Options
Options +FollowSymLinks
DirectorySlash On
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteLogLevel 5
# RewriteLog "/home/websites/logs/admin.bal.com-rewrite_log"
RewriteCond %{HTTP_HOST} ^live.admin.bal.com$ [NC]
RewriteRule ^/(.*)$ http://admin.bal.com/$1 [NC,R,L]
RewriteCond %{HTTP_HOST} ^admin.bal.com$ [NC]
RewriteRule ^/(.*)$ /live/$1 [NC,L]
RewriteCond %{HTTP_HOST} ^(.*).admin.bal.com [NC]
# RewriteCond %{DOCUMENT_ROOT}/%1 !-d
RewriteCond %{DOCUMENT_ROOT}/%1 !-f
RewriteRule ^/(.*)$ http://admin.bal.com/$1 [NC,R,L]
RewriteCond %{HTTP_HOST} !^admin.bal.com$ [NC]
RewriteRule /robots.txt$ /home/websites/robots.txt [NC,L]
RewriteCond %{HTTP_HOST} ^(.*).admin.bal.com$ [NC]
RewriteRule ^/(.*)$ /%1/$1 [NC,L]
</IfModule>
<Files ~ "^\.(htaccess|htpasswd)$">
Order Deny,Allow
Deny from all
Satisfy All
</Files>
</VirtualHost>
But when I use safari to access admin.bal.com
I don't know why display Safari can't find the server