zoukankan      html  css  js  c++  java
  • apache2 ubuntu18.04 配置虚拟端口

    修改3个文件
    /etc/apache2/apache2.conf
    /etc/apache2/ports.conf
    /etc/apache2/sites-available/000-default.conf


    apache2.conf中,新增如下代码

    <Directory /var/www/html>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
    </Directory>

    复制一个这样的东西出来,修改一下/var/www/html/改成你想映射的虚拟目录

    ports.conf中

    把需要监听的端口写成这样的形式就可以了,我这里监听66端口

    000-default.conf中,找类似下图的地方

    复制一个这样的东西出来,
    把 80改成之前设好的监听端口66
    把 /var/www改成之前设好的需要访问的目录/var/www/html

    最后重启apache即可
    ubuntu下的开始,停止,重启
    /etc/init.d/apache2 start
    /etc/init.d/apache2 stop
    /etc/init.d/apache2 restart

  • 相关阅读:
    hdu 2089 不要62(初学数位DP)
    字符串与整数之间的转换
    字符串之判断重复字符串
    字符串之全排列
    字符串之移位
    链表
    STL之map
    海量数据处理
    字符串之strchr
    字符串之_strncat
  • 原文地址:https://www.cnblogs.com/tirmer/p/9927385.html
Copyright © 2011-2022 走看看