Access web pages without adding domain on Zpanel hosting

This is called as Enable website preview in Zpanel



zpanel users now we are able to implement Web site preview function in zpanel without needing to use a domain name.

With this settings user can preview there managed website from zpanel with out DNS directed.

After establishing below access the many accounts from http: //IP/~username

open up the /etc/zpanel/configs/apache/httpd. conf data file and add below code from the file.



# Add Alias for DNS-Less Previews
<VirtualHost *:80>
ServerName ***ServerIP***
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.
Share on Google Plus

About srimaster

Tech Dropper is simple, easy and newest technology source with experiments and demos. I will give you tutorials, notes, code snippets, demos using PHP, MySQL, jQuery, HTML, CSS, Ajax and Javascripts.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment