让VHosts与EasyPHP一起使用 [英] Getting VHosts working with EasyPHP

查看:95
本文介绍了让VHosts与EasyPHP一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我一直在尝试使用EasyPHP Devserver 16.1在新的Windows 10安装中设置虚拟主机.

So I've been trying to setup vhosts on my new Windows 10 Installation with EasyPHP Devserver 16.1.

我已经修改了etc/vhosts以包括我的新域(mysite.local),该域可以工作,但仍指向默认的easyphp目录.因此,我修改了httpd-vhosts.conf将该域指向我的新目录:

I've modified etc/vhosts to include my new domain (mysite.local), which works, but still points to the default easyphp directory. So I modified httpd-vhosts.conf to point that domain to my new directory:

<VirtualHost *:80>
    DocumentRoot "C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www"
    ServerName localhost
</VirtualHost>
<VirtualHost *:80>
    DocumentRoot "C:\Users\Chris\Documents\Web_Development\mysite"
    ServerName mysite.local
</VirtualHost>

但是,当我启动服务器时,它将擦除此文件,因此它只是空白,并且我的域仍然指向默认的easyphp目录.是什么原因造成的/如何解决?

However when I start the server, it wipes this file so that it's just blank, and my domain still points to the default easyphp directory. What would be causing this/how can I fix it?

我尝试将虚拟主机直接放入httpd.conf中,但这并没有任何改变,但我的新域仍指向默认文件夹.

I've tried putting the vhosts directly into httpd.conf, however that doesn't change anything, still my new domain points to the default folder.

我真的无法解决这个问题,我绝对需要vhost才能工作,以便可以在多个站点上工作.

I'm really not getting anywhere with this and I absolutely need vhosts working so I can work on multiple sites.

我可以回到在Mac OS上使用的Xampp,但是我遇到了一个持续存在的问题,即PHPExcel无法正确导出,因此我想尝试Easy PHP

I could go back to Xampp, which is what I used on Mac OS, however I had an ongoing issue with that where PHPExcel didn't export properly so I'd like to try with Easy PHP

推荐答案

在httpd.conf的末尾添加:包括conf/whateveryouwant.conf 并将您的虚拟主机放在此文件中

At the end of your httpd.conf add : Include conf/whateveryouwant.conf And put your virtual hosts in this file

这篇关于让VHosts与EasyPHP一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆