ENABLE WEBSITE PREVIEW IN ZPANEL

Enable website preview in Zpanel

Linux Just 4 U

 

 

Hi Linux techs and zpanel users now we can implement Website preview feature in zpanel without having to use a domain name.

With this settings user can preview there hosted website at zpanel  without DNS pointing.

After setting below access all the accounts at http://IP/~username

 

open the /etc/zpanel/configs/apache/httpd.conf   file and add below code in the file.

 

# Add Alias for DNS-Less Previews
<VirtualHost *:80>
ServerName [b]ServerIP[/b]
DocumentRoot /etc/zpanel/panel/
AliasMatch ^/~([a-zA-Z0-9]+)/?(.*) /var/zpanel/hostdata/$1/public_html/$2
<Directory /var/zpanel/hostdata>
Options FollowSymLinks Indexes
AllowOverride All
Order Allow,Deny
Allow from all
DirectoryIndex index.php index.html index.htm
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_admin_value upload_tmp_dir /var/zpanel/temp
</IfModule>
</Directory>
</virtualhost>

 

Note: – Please change ServerIP above with your IP.

 

Save the file and restart webserver.

# service httpd restart

http://IP/~username

for zadmin accounts preview URL will be.

http://IP/~zadmin/rootdirectory 

}