我在装有xampp和bitnami的Windows7机器上安装了wordpress。
默认情况下,它的url是http://127.0.0.1/wordpress
如何将其更改为不带页面前缀的标准主机名(如http://myworpdress)
发布于 2017-01-09 18:05:49
bnconfig堆栈包括一个名为"bnconfig“的工具,它可以让您轻松解决此问题。所有内容都记录在Bitnami文档中,请查看下面的链接:
发布于 2014-02-22 21:02:14
您必须在主机文件(C:\Windows\System32\Drivers\etc\ hosts )中为您的域创建一个条目
127.0.0.1 mywordpress此外,如果要在本地计算机上测试多个域,则可以在apache配置中添加vhosts
<VirtualHost *:80>
ServerName wordpress
DocumentRoot C:\yourpath\...
</VirtualHost>vhost配置位于C:\xampp\apache\conf\extra\httpd-vhosts.conf下。还应在vhosts.conf文件中启用NameVirtualHost
NameVirtualHost 127.0.0.1发布于 2017-01-09 04:54:48
另一种解决方案是创建别名。在此场景中,您仍将引用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>https://stackoverflow.com/questions/21954545
复制相似问题