<bdo id='atawl'></bdo><ul id='atawl'></ul>

      1. <tfoot id='atawl'></tfoot>
      2. <small id='atawl'></small><noframes id='atawl'>

        <legend id='atawl'><style id='atawl'><dir id='atawl'><q id='atawl'></q></dir></style></legend>
        <i id='atawl'><tr id='atawl'><dt id='atawl'><q id='atawl'><span id='atawl'><b id='atawl'><form id='atawl'><ins id='atawl'></ins><ul id='atawl'></ul><sub id='atawl'></sub></form><legend id='atawl'></legend><bdo id='atawl'><pre id='atawl'><center id='atawl'></center></pre></bdo></b><th id='atawl'></th></span></q></dt></tr></i><div id='atawl'><tfoot id='atawl'></tfoot><dl id='atawl'><fieldset id='atawl'></fieldset></dl></div>
      3. 使用 XAMPP 托管多个本地站点

        Hosting multiple local sites with XAMPP(使用 XAMPP 托管多个本地站点)
        1. <tfoot id='gLTXM'></tfoot>
            <tbody id='gLTXM'></tbody>

        2. <small id='gLTXM'></small><noframes id='gLTXM'>

          <i id='gLTXM'><tr id='gLTXM'><dt id='gLTXM'><q id='gLTXM'><span id='gLTXM'><b id='gLTXM'><form id='gLTXM'><ins id='gLTXM'></ins><ul id='gLTXM'></ul><sub id='gLTXM'></sub></form><legend id='gLTXM'></legend><bdo id='gLTXM'><pre id='gLTXM'><center id='gLTXM'></center></pre></bdo></b><th id='gLTXM'></th></span></q></dt></tr></i><div id='gLTXM'><tfoot id='gLTXM'></tfoot><dl id='gLTXM'><fieldset id='gLTXM'></fieldset></dl></div>
          • <legend id='gLTXM'><style id='gLTXM'><dir id='gLTXM'><q id='gLTXM'></q></dir></style></legend>
              • <bdo id='gLTXM'></bdo><ul id='gLTXM'></ul>
                  本文介绍了使用 XAMPP 托管多个本地站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我是使用 XAMPP 的新手,所以这对某些人来说可能很简单.

                  I'm new to using XAMPP so this may be simple to some people.

                  我有一些 php 项目,我希望能够在本地调试并在浏览器中查看(不是同时进行,但每次我想处理不同的项目时都不必更改配置文件/复制项目文件夹).

                  I have a few php projects that I would like to be able to debug locally and view in the browser (not concurrently, but without having to change config files/copy project folders each time I want to work on a different project).

                  在 IIS 上,您可以设置多个站点以从您的计算机上提供服务,我正在 XAMPP 中寻找类似的东西.使用 IIS 时,我在 Windows 主机文件中添加了多条记录,因此我可以通过键入友好的 Web 样式地址(如 http://myproject1.dev)

                  On IIS, you could set up multiple sites to serve from your machine, and I'm looking for something similar in XAMPP. When using IIS, I added multiple records to the Windows hosts file so I could access the locally hosted sites by typing friendly web-style addresses (like http://myproject1.dev)

                  谢谢.

                  推荐答案

                  Greg,你快到了——你需要(就像 Moses 所说的那样)设置虚拟主机.

                  Greg, you're almost there--you need (like Moses said) to setup virtual hosts.

                  所以如果你的 Windows 主机文件有

                  So if your Windows hosts file has

                  127.0.0.1    localhost
                  127.0.0.1    mysite-dev.com
                  127.0.0.1    anothersite-dev.com
                  

                  您的虚拟主机文件 (httpd-vhosts.conf) 可能如下所示:

                  Your virtual hosts file (httpd-vhosts.conf) might look like:

                  <VirtualHost *:80>
                    DocumentRoot C:/xampp/htdocs/
                    ServerName localhost
                  </VirtualHost>
                  
                  <VirtualHost *:80>
                  
                      ServerName mysite-dev.com
                  
                      DocumentRoot "C:/sites/mysite-dev"
                  
                      <Directory "C:/sites/mysite-dev">
                          Options Indexes FollowSymLinks
                          AllowOverride All
                          Order allow,deny
                          Allow from all
                      </Directory>
                  
                  </VirtualHost>
                  
                  <VirtualHost *:80>
                  
                      ServerName anothersite-dev.com
                  
                      DocumentRoot "C:/sites/anothersite-dev"
                  
                      <Directory "C:/sites/anothersite-dev">
                          Options Indexes FollowSymLinks
                          AllowOverride All
                          Order allow,deny
                          Allow from all
                      </Directory>
                  
                  </VirtualHost>
                  

                  进行任何更改后不要忘记重新启动网络服务器.

                  Don't forget to restart the web server after you make any changes.

                  这篇关于使用 XAMPP 托管多个本地站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Converting string to MySQL timestamp format in php(在php中将字符串转换为MySQL时间戳格式)
                  datetime to timestamp(日期时间到时间戳)
                  PHP timestamp date to user timezone(PHP时间戳日期到用户时区)
                  Converting TIMESTAMP to unix time in PHP?(在 PHP 中将 TIMESTAMP 转换为 unix 时间?)
                  Convert ISO 8601 to unixtimestamp(将 ISO 8601 转换为 unixtimestamp)
                  Finding days between 2 unix timestamps in php(在php中查找2个unix时间戳之间的天数)
                  <tfoot id='o5TNE'></tfoot>

                    <tbody id='o5TNE'></tbody>
                    <i id='o5TNE'><tr id='o5TNE'><dt id='o5TNE'><q id='o5TNE'><span id='o5TNE'><b id='o5TNE'><form id='o5TNE'><ins id='o5TNE'></ins><ul id='o5TNE'></ul><sub id='o5TNE'></sub></form><legend id='o5TNE'></legend><bdo id='o5TNE'><pre id='o5TNE'><center id='o5TNE'></center></pre></bdo></b><th id='o5TNE'></th></span></q></dt></tr></i><div id='o5TNE'><tfoot id='o5TNE'></tfoot><dl id='o5TNE'><fieldset id='o5TNE'></fieldset></dl></div>
                          <legend id='o5TNE'><style id='o5TNE'><dir id='o5TNE'><q id='o5TNE'></q></dir></style></legend>
                        1. <small id='o5TNE'></small><noframes id='o5TNE'>

                            <bdo id='o5TNE'></bdo><ul id='o5TNE'></ul>