我在运行 browsersync 时遇到问题。当我运行gulp sync时,浏览器会在http://localhost:8080/app_dev.php url上运行卡在加载中的空白页面。
我使用代理选项连接到通过 php 应用程序(symfony)链接到我的本地服务器的虚拟主机。这是我的配置:
gulpfile.js
gulp.task('sync', function() {
browserSync.init({
proxy: 'progress_app.localhost/app_dev.php',
port: 8080,
open: true,
notify: false
});
});
httpd.conf
<VirtualHost *:80>
DocumentRoot "C:\xampp\htdocs\progress_app\web"
DirectoryIndex index.php
ServerName progress_app.localhost
ServerAlias progress_app.localhost
<Directory "C:\xampp\htdocs\progress_app\web>
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>