search

Home  >  Q&A  >  body text

apache - 如何配置多站点在同一服务器上

注意!
ubuntu下的配置文件与其他与其他系统不同,所以我在网上找不到合适的教程,在不开启虚拟主机的情况下,两个网址都可以转到服务器的目录下
希望大佬能够尽量详细一点解释这个问题谢谢

巴扎黑巴扎黑2778 days ago629

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-04-24 09:15:21

    The configuration under ubunutu is the same as others, except for the ubuntu configuration file /etc/apache2/apache2.conf都是includeother configuration files. For example,

    # 载入模块已经配置
    IncludeOptional mods-enabled/*.load
    IncludeOptional mods-enabled/*.conf
    # 配置虚拟主机
    InludeOptional sites-enabled/*.conf

    Referencesites-enable/ 里面的default.confWrite a configuration file and place it in this directory.

    Actually, just follow the tutorials on the Internet. However, in order to make it more convenient for everyone, Ubuntu has reorganized the structure of the configuration file. It is not necessary to write them all in the same configuration file.

    For example, if you want to load a new module, just mods-available 里面的对应文件复制到mods-enabled/.

    reply
    0
  • Cancelreply