Introduce
When using the default Cpanel, when accessing the IP, it will display the content of the website that was added for the first time (the first website appears in vHost) so the websites are resolved to the IP that the website is not added. the server will display this default site.
In many cases, you want to change the configuration so that the IP points to another website, you can do it in the following way
Cấu hình Default virtualHost share IP cpanel
You need to add virushost to the file /etc/apache2/conf.d/includes/pre_virtualhost_global.conf
By the following way.
Cpanel root login
Access the webserver's editor in the following order:
1: WHM » Service Configuration » Apache Configuration » Include Editor.
2: Under Pre VirtualHost select apache all version
3: Add virtual host for IP in the opened box
4: Select Update to save
5: Restart Apache
You do as the attached photo
IP configuration example 10.0.1.1
go to /var/www/html . directory
<VirtualHost 10.0.1.1:80>
DocumentRoot /var/www/html
</VirtualHost>
<VirtualHost 10.0.1.1:443>
DocumentRoot /var/www/html
<IfModule suphp_module>
suPHP_UserGroup nobody nobody
</IfModule>
<Directory "/var/www/html">
AllowOverride All
</Directory>
<IfModule ssl_module>
SSLEngine on
SSLCertificateFile /var/cpanel/ssl/cpanel/cpanel.pem
SSLCertificateKeyFile /var/cpanel/ssl/cpanel/cpanel.pem
SSLCertificateChainFile /var/cpanel/ssl/cpanel/cpanel.pem
SSLUseStapling Off
</IfModule>
<IfModule security2_module>
SecRuleEngine On
</IfModule>
</VirtualHost>
Repeat operation for required IPs.
Thank you customer
Post a Comment
Post a Comment