美文网首页
apache_conf

apache_conf

作者: warmi_ | 来源:发表于2018-12-12 14:30 被阅读0次

    yum install httpd 安装
    systemctl start httpd.service 开启服务
    systemctl enable httpd.service 开机自动重启服务
    vi /etc/httpd/conf/httpd.conf 配置文件

    Listen 80 
     
    # Listen for virtual host requests on all IP addresses 
    NameVirtualHost *:80 
     
    <VirtualHost *:80> 
        DocumentRoot /www/example1 
    DirectoryIndex index.html index.htm index.php index.php
        ServerName www.example1.com 
        ServerAlias example1.com. *.example1.com 
        # Other directives here 
    </VirtualHost> 
     
    <VirtualHost *:80> 
        DocumentRoot /www/example2 
        ServerName www.example2.org 
        # Other directives here 
    </VirtualHost>
    
    
    

    systemctl restart httpd.service 重启服务

    相关文章

      网友评论

          本文标题:apache_conf

          本文链接:https://www.haomeiwen.com/subject/uhauhqtx.html