Remove zdoo from the address

2019-08-09 10:31:23    Renee    2924

After you installed Zdoo following the steps, you will find there is 'ranzhi' in the URL. You might want to know how to remove it. That’s quite easy and follow the steps below.


1. Configure the one-click installation package

The configuration template for configuring the one-click installation package is offered. All you have to do is to turn on relevant parameters. Find xampp\apache\config\httpd.conf and xampp\runner\res\apache\conf\httpd.conf in Windows or /opt/zbox/etc/apache/httpd.conf in Linux. If use Lampp in Linux, find /opt/lampp/etc/httpd.conf.


Go to those files and change the configuration for VirtualHost. Delete the comment and restart Apache.


# If you want visit zdoo like http://localhost/, uncomment these lines.
#<VirtualHost *:81>
#  ServerAdmin zdoo@local.net
#  DocumentRoot "/xampp/zdoo/www"
#  ServerName localhost:81
#  <Directory />
#    AllowOverride none
#    Require all granted
#  </Directory>
#  ErrorLog "logs/error_log"
#  CustomLog "logs/access_log" combind
#</VirtualHost>


2. General configuration

If you configure your own Apache, you can refer to the steps below to do it.

2.1 Find the Apache configuration file. For Windows, it is in  apache/conf. For Linux, it is in  /etc/apache or /etc/httpd.

2.2 Find the configuration file for the VirtualHost. It is either in httpd-vhost.conf or httpd.conf.

2.3 Change the code in the file as shown below.


<VirtualHost *:80>
ServerName pms.zdoo.net # Change it to your actual domain.
DocumentRoot /home/www/zdoo/www/ # Change it to the actual /www in your Zdoo. 
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>  
</VirtualHost>


2.4 Find  ranzhi/config/my.php.  If it is set as $config->webRoot = getWebRoot(), skip this step. If not, change it to


$config->webRoot = '/'; 


2.5 Restart Apache.