Symfony 4-我的Wampserver虚拟主机不起作用

时间:2019-07-11 19:53:16

标签: apache symfony wamp

我想为我的Symfony 4项目使用vHost。

它位于c:/ wamp64 / www / symbnbb

因此,在主机文件中,我添加了以下内容:

  

127.0.0.1 symbnbb.local   :: 1 symbnbb.local

在%APACHEDIR%\ conf \ extra \ httpd-vhosts.conf中,我添加了:

<VirtualHost *:80>
    ServerName symbnbb.local
    ServerAlias www.symbnbb.local

    DocumentRoot "c:/wamp64/www/symbnbb/public"
    <Directory "c:/wamp64/www/symbnbb/public/">
        AllowOverride All
        Order Allow,Deny
        Allow from All
    </Directory>
</VirtualHost>

但是它不起作用,如果我转到本地主机,我就会这样:

Le chemin ${INSTALL_DIR}/www pour DocumentRoot n'existe pas (Fichier c:/wamp64/bin/apache/apache2.4.37/conf/extra/httpd-vhosts.conf)
Le chemin ${INSTALL_DIR}/www/ pour <Directory ... n'existe pas (Fichier c:/wamp64/bin/apache/apache2.4.37/conf/extra/httpd-vhosts.conf)

有人可以帮我吗?

1 个答案:

答案 0 :(得分:0)

在您的主机文件中写:

const roses_color = "blue"

new Promise((resolve, reject) => {
    (roses_color === "red") ? resolve("are") : reject("are not")
})
.then((result) => 
    new Promise((resolve, reject) => {
        setTimeout(() => resolve(`Roses ${result} red`), 1000)
    })
)
.catch(async (error) => {
    await promiseWhichWillResolve()

    throw `Roses ${error} red`
})
.then((result) => res.send(`This is true: ${result}`))
.catch((error) => res.send(`ERROR: ${error}`))

在您的虚拟主机中删除:

127.0.0.1 symbnbb.local

然后在您的Web浏览器中,调用“ symbnbb.local”,它应该可以工作。

相关问题