<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 托管多个本地站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                  <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>