• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

virtual host in linux

erik_paka

New member
Aug 21, 2019
8
1
3
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
 
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock