当前位置 主页 > 服务器问题 > Linux/apache问题 > 最大化 缩小

    linux环境apache多端口配置虚拟主机的方法深入介绍(2)

    栏目:Linux/apache问题 时间:2019-11-12 18:24


    <Directory "D:/AppServ/www-chinaec" >
    Options FollowSymLinks
    #Deny from all
    Allow from all
    </Directory>
    ServerAdmin jsw7001@hotmail.com
    DocumentRoot D:/AppServ/www-chinaec
    ServerName www.dede.com
    DirectoryIndex index.php index.html
    ErrorLog D:/AppServ/www-chinaec/errornongjiale.log
    CustomLog logs/dummy-host2.appservnetwork.com-access_log common
    </VirtualHost>
    <VirtualHost *:83>
    ServerAdmin jsw7001@hotmail.com
    DocumentRoot D:/AppServ/www/www-05110
    ServerName www.dede.com
    ErrorLog D:/AppServ/www/www-05110/errornong05110.log
    CustomLog logs/dummy-host2.appservnetwork.com-access_log common
    </VirtualHost>
    <VirtualHost *:84>
    ServerAdmin jsw7001@hotmail.com
    DocumentRoot D:/AppServ/www/wordpress
    ServerName www.dede.com
    ErrorLog D:/AppServ/www/wordpress/errornongwordpress.log
    CustomLog logs/dummy-host2.appservnetwork.com-access_log common
    </VirtualHost>
    <VirtualHost *:85>
    ServerAdmin jsw7001@hotmail.com
    DocumentRoot D:/AppServ/www/magento
    ServerName www.dede.com
    ErrorLog D:/AppServ/www/magento/errormagento.log
    CustomLog logs/dummy-host2.appservnetwork.com-access_log common
    </VirtualHost>
    <VirtualHost *:86>
    ServerAdmin jsw7001@hotmail.com
    DocumentRoot D:/AppServ/www/magento1322
    ServerName www.dede.com
    ErrorLog D:/AppServ/www/magento1322/errormagento1322.log
    CustomLog logs/dummy-host2.appservnetwork.com-access_log common
    </VirtualHost>
    <VirtualHost *:88>
    ServerAdmin jsw7001@hotmail.com
    DocumentRoot D:/AppServ/www/www-nongjiale
    ServerName www.dede.com
    ErrorLog D:/AppServ/www/www-nongjiale/errornongjiale.log
    CustomLog logs/dummy-host2.appservnetwork.com-access_log common
    </VirtualHost>
    <VirtualHost *:80>
    ServerAdmin webmaster@dummy-host2.x
    DocumentRoot "C:/Apache2.2/docs/dummy-host2.x"
    ServerName dummy-host2.x
    ErrorLog "logs/dummy-host2.x-error.log"
    CustomLog "logs/dummy-host2.x-access.log" common
    </VirtualHost>

    1、单域名单端口设置
    如:www.abc.com 默认用80访问

    特别说明,apache的配置默认都在安装目录下的conf目录里面
    或者是/etc/apache2
    不过一定要注意,listen.conf文件中端口监听是否开启
    如下图,表示已经开启80端口监听

    直接默认
    1、单域名单端口设置
    如:www.abc.com 默认用80访问

    特别说明,apache的配置默认都在安装目录下的conf目录里面
    或者是/etc/apache2
    不过一定要注意,listen.conf文件中端口监听是否开启
    如下图,表示已经开启80端口监听
    直接默认修改default-server.conf

    这个配置最好简单
    安装好了,之后,默认已经能够使用了,只是要把它修改成你需要的域名及访问路径罢了。

    给一个标准配置吧
    复制代码 代码如下:
    DocumentRoot "/srv/www/htdocs"
    #
    # Configure the DocumentRoot
    #
    <Directory "/srv/www/htdocs">
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    下一篇:没有了