【问题标题】:Wordpress on windows with xampp How to change default URL带有xampp的Windows上的Wordpress如何更改默认URL
【发布时间】:2014-03-24 03:43:07
【问题描述】:

我用 xampp 和 bitnami 在 Windows 7 机器上安装 wordpress。

默认是http://127.0.0.1/wordpress

如何将其更改为不带页面前缀的标准主机名(如http://myworpdress

【问题讨论】:

    标签: php wordpress apache xampp bitnami


    【解决方案1】:

    Bitnami WordPress 堆栈包含一个名为“bnconfig”的工具,可让您轻松解决此问题。所有内容都记录在 Bitnami 文档中,请查看以下链接:

    https://docs.bitnami.com/installer/apps/wordpress/#how-to-configure-the-application-to-run-at-the-root-url-of-the-domain

    【讨论】:

      【解决方案2】:

      您必须在您的主机文件(C:\Windows\System32\Drivers\etc\hosts)中为您的域创建一个条目

      127.0.0.1    mywordpress
      

      此外,如果您要在本地机器上测试多个域,您可以在 apache 配置中添加虚拟主机

      <VirtualHost *:80>
          ServerName wordpress
      
          DocumentRoot C:\yourpath\...
      </VirtualHost>
      

      vhost 配置位于 C:\xampp\apache\conf\extra\httpd-vhosts.conf 下。 NameVirtualHost 也应该在 vhosts.conf 文件中启用

      NameVirtualHost 127.0.0.1
      

      【讨论】:

        【解决方案3】:

        另一种解决方案是创建别名。在这种情况下,您仍将引用 localhost,但您也可以在单个服务器上永久拥有多个并行网站,并在文件系统上的任何位置定位它们。

        例如:

        在 apache httpd.conf 文件的 DocumentRoot 部分添加以下内容:

        Alias /toenails/ "C:\projects\toenails/"
        <Directory "C:\projects\toenails">
            #
            # Possible values for the Options directive are "None", "All",
            # or any combination of:
            #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
            #
            # Note that "MultiViews" must be named *explicitly* --- "Options All"
            # doesn't give it to you.
            #
            # The Options directive is both complicated and important.  Please see
            # http://httpd.apache.org/docs/2.4/mod/core.html#options
            # for more information.
            #
            Options Indexes FollowSymLinks Includes ExecCGI
        
            #
            # AllowOverride controls what directives may be placed in .htaccess files.
            # It can be "All", "None", or any combination of the keywords:
            #   AllowOverride FileInfo AuthConfig Limit
            #
            AllowOverride All
        
            #
            # Controls who can get stuff from this server.
            #
            Require all granted
        
        </Directory>
        

        【讨论】:

          猜你喜欢
          • 2012-08-12
          • 2017-06-08
          • 2019-03-13
          • 1970-01-01
          • 1970-01-01
          • 2014-05-26
          • 2011-12-02
          • 2016-10-05
          相关资源
          最近更新 更多