【问题标题】:Settings for subdirectory WordPress installs on existing XAMPP WordPress localhost installs现有 XAMPP WordPress localhost 安装上的子目录 WordPress 安装设置
【发布时间】:2020-06-20 17:26:39
【问题描述】:

在 Win10Pro 工作站上的 localhost XAMPP 上安装多个 WordPress 运行良好。 现在尝试将 WordPress 安装到其中一个现有安装的子目录中。不确定要进行哪些设置,因为它是在 XAMPP 上 localhost Wordpress 安装的子目录中安装新的 WordPress;并且,不确定 xampp/apache/conf/extra/httpd-vhosts 文件和任何其他文件中任何 ## 条目的正确语法。此外,这些行的正确语法是什么:这些条目中的 ServerName 和 ServerAlias ??? 我通常将这些多个名称命名为 name.dev。这增加了下一个问题,我应该在上述条目中包含“.dev”部分吗? 提前致谢。

【问题讨论】:

    标签: wordpress xampp


    【解决方案1】:

    我想你可以参考这里有一个链接供你参考:

    https://github.com/oliguo/Server-Deployment/blob/master/XAMPP.md#virtual-host-setup

    在 etc/httpd.conf 上启用 vhosts.conf

    Include etc/extra/httpd-vhosts.conf
    

    再添加一个端口,你的另一个 wordpress 将指向什么。

    #like website
    listen 80
    #like another website
    listen 81
    

    然后编辑 etc/extra/httpd-vhosts.conf 上的 vhosts.conf

    NameVirtualHost *:80
    <VirtualHost *:80>
      DocumentRoot /opt/lampp/htdocs/website_a
      ErrorLog "/opt/lampp/htdocs/website_a/error_log"
    </VirtualHost>
    
    NameVirtualHost *:81
    <VirtualHost *:81>
      DocumentRoot /opt/lampp/htdocs/website_b
      ErrorLog "/opt/lampp/htdocs/website_b/error_log"
    </VirtualHost>
    

    然后重启xampp。

    【讨论】:

      猜你喜欢
      • 2017-07-12
      • 2020-05-19
      • 2018-08-12
      • 2016-10-12
      • 2012-10-08
      • 1970-01-01
      • 2013-04-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多