Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browser-sync will not connect to proxy #2004

Open
8 tasks
dorothyDorothy opened this issue Jan 22, 2023 · 0 comments
Open
8 tasks

Browser-sync will not connect to proxy #2004

dorothyDorothy opened this issue Jan 22, 2023 · 0 comments

Comments

@dorothyDorothy
Copy link

Issue details

Gulp version 4.0.2
Apache version 2.4.54

Browser-sync suddenly stopped working on one project. There is no evidence that it connects to my local virtual host, nothing in the apache logs.
At start up it opens a new browser tab but only shows the message:
Directory access is forbidden.
The console shows that it is "Watching files..." and that it is "Reloading Browsers..." but the browser does not reload.
I've checked the file permissions but they are correct.

Steps to reproduce/test case

Initially browser-sync was working fine.
Run browser-sync using Gulp.
Save an image to a directory that is part of the app.
Browser now shows Directory access is forbidden.

I've never seen this happen before. It looks like a permissions issue but maybe there is a directory that I have missed? The obvious place to look is the directory where the image was saved to but I can see nothing amiss there.

Please specify which version of Browsersync, node and npm you're running

  • Browsersync [ 2.27.11 ]
  • Node [ v19.2.0 ]
  • Npm [ 8.19.3 ]

Affected platforms

  • [x ] linux
  • windows
  • OS X
  • freebsd
  • solaris
  • other (please specify which)

Browsersync use-case

  • API
  • [x ] Gulp
  • Grunt
  • CLI

If CLI, please paste the entire command below

{cli command here}

for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync

Below is the relevant part of the gulp code:

function simpleBs() {
  browserSync.init({
    proxy: "http://devd.ct-basic/",
    serveStatic: ['./deploy/public_html/'],
    watch: true,
    // logLevel: silent,
    files: [
      srcPaths.sassSrc + '**/*.scss',
      srcPaths.js + '**/*.js',
      distPaths.templates + "**/*.html",
      distPaths.templates + "**/*.xml"
    ]
  });
}


function watcher () {
  simpleBs();

  watch([srcPaths.sassSrc + '**/*.scss'],
    series(cleanCssFolder, compileSass, cssMinify)
  );
 
  watch([srcPaths.js + '**/*.js'],
    series(cleanJs, copyJs, jsMinify, copyVendorJs)
  );  
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant