vi /usr/local/httpd/conf/extra/httpd-vhosts.conf//创建独立的配置文件
<VirtualHost *:80>DocumentRoot "/var/www/html/kgccom"ServerName www.kgc.comErrorLog "logs/www.kgc.com.error_log"CustomLog "logs/www.kgc.com.access_log" common
<Directory "/var/www/html">Require all granted
</Directory></VirtualHost><VirtualHost *:80>DocumentRoot "/var/www/html/kccecom"ServerName www.kcce.comErrorLog "logs/www.kcce.com.error_log"CustomLog "logs/www.kcce.com.access_log" common
<Directory "/var/www/html">Require all granted
</Directory></VirtualHost>//加载独立的配置文件
vi /usr/local/httpd/conf/httpd.conf
Include conf/extra/httpd-vhosts.conf# 重启服务
systemctl restart httpd
3、基于 IP 地址、基于端口的虚拟主机
基于 IP 地址的虚拟主机
vi /usr/local/httpd/conf/extra/httpd-vhosts.conf//创建独立的配置文件
<VirtualHost 192.168.72.154:80>DocumentRoot "/var/www/html/kgccom"ServerName www.kgc.comErrorLog "logs/www.kgc.com.error_log"CustomLog "logs/www.kgc.com.access_log" common
<Directory "/var/www/html">Require all granted
</Directory></VirtualHost><VirtualHost 192.168.72.154:80>DocumentRoot "/var/www/html/kccecom"ServerName www.kcce.comErrorLog "logs/www.kcce.com.error_log"CustomLog "logs/www.kcce.com.access_log" common
<Directory "/var/www/html">Require all granted
</Directory></VirtualHost>
基于端口的虚拟主机
vi /usr/local/httpd/conf/extra/httpd-vhosts.conf//创建独立的配置文件
<VirtualHost 192.168.72.154:81>DocumentRoot "/var/www/html/kgccom"ServerName www.kgc.comErrorLog "logs/www.kgc.com.error_log"CustomLog "logs/www.kgc.com.access_log" common
<Directory "/var/www/html">Require all granted
</Directory></VirtualHost><VirtualHost 192.168.72.154:82>DocumentRoot "/var/www/html/kccecom"ServerName www.kcce.comErrorLog "logs/www.kcce.com.error_log"CustomLog "logs/www.kcce.com.access_log" common
<Directory "/var/www/html">Require all granted
</Directory></VirtualHost># 还需要再主配置文件添加 Listen 进行监听端口
作者:Nick Zhu 排版:Alan Wang 大家好,欢迎阅读 Visual Studio Code for Java 的六月更新!在这篇博客中,我们将分享项目设置项目的重要更新以及一系列 Spring 的功能改进,让我们开始吧!
项目设…
declare type i_type is table of varchar2(50) index by varchar2(50); tab i_type; idx varchar2(50); begin tab(A):东邪; tab(a):西毒; tab(g):南帝; tab(d):北丐; tab(p):中神通; idx : tab.first; loop dbms_output.put_line(tab(idx)); exi…