如何有效地分支和使用独立服务器(例如 Apache)

发布于 2024-09-30 10:12:00 字数 632 浏览 2 评论 0原文

我可以看到,如果您使用 Rails 或 django,那么分支很容易,它们的开发目录中有开发服务器(django-admin.py runserver)。

目前我正在开发由 Apache (windows) 提供服务的 php。如果我从 php 目录创建一个分支,我需要编辑 httpd.conf 并添加新分支。

有没有办法让我可以立即使用 apache 获得一个分支?我希望它是这样的: http://master.project.localhost -> /projects/masterhttp://testing.project.localhost -> /projects/testing

我读到主机文件不能有通配符。我必须使用 DNS 软件或其他软件来简化此过程吗?

另外,我的项目无法运行目录, http://project.localhost/masterhttp://project.localhost/testing 不起作用

I can see branching is easy if you're using rails or django, which has development servers in their development directories (django-admin.py runserver).

At the moment I'm developing php served by Apache (windows). If I make a branch out of my php directory, I need to edit httpd.conf and add the new branch.

Is there a way I can get a branch just to work instantly with apache? I'd love it to be like this: http://master.project.localhost -> /projects/master, http://testing.project.localhost -> /projects/testing

I've read that the hostfiles can't have wildcards. Must I use a DNS-software or something to get this streamlined?

Also, my projects can't run i directories, http://project.localhost/master and http://project.localhost/testing, is not working

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夏见 2024-10-07 10:12:00

查看 Apache 中的 site-available/sites-enabled ,以便您可以使用一台服务器运行多个站点(使用 a2ensite 等)。

Look at sites-available/sites-enabled in Apache so that you can run multiple sites with one server (using a2ensite, etc).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文