首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >使用xampp的windows上的Wordpress如何更改默认URL

使用xampp的windows上的Wordpress如何更改默认URL
EN

Stack Overflow用户
提问于 2014-02-22 20:47:40
回答 3查看 1.4K关注 0票数 0

我在装有xampp和bitnami的Windows7机器上安装了wordpress。

默认情况下,它的url是http://127.0.0.1/wordpress

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

EN

回答 3

Stack Overflow用户

发布于 2017-01-09 18:05:49

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

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

票数 1
EN

Stack Overflow用户

发布于 2014-02-22 21:02:14

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

代码语言:javascript
运行
复制
127.0.0.1    mywordpress

此外,如果要在本地计算机上测试多个域,则可以在apache配置中添加vhosts

代码语言:javascript
运行
复制
<VirtualHost *:80>
    ServerName wordpress

    DocumentRoot C:\yourpath\...
</VirtualHost>

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

代码语言:javascript
运行
复制
NameVirtualHost 127.0.0.1
票数 0
EN

Stack Overflow用户

发布于 2017-01-09 04:54:48

另一种解决方案是创建别名。在此场景中,您仍将引用localhost,但您也可以在一台服务器上永久拥有多个并行网站,并将它们放置在文件系统上的任意位置。

例如:

  • http://localhost/toenails/
  • http://localhost/sock_collection/
  • etc.

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

代码语言:javascript
运行
复制
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>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21954545

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档