Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

375
Vistas
How to use browsersync with an apache vhost on same port?

I know there are a lot of similar questions on SO and GitHub about this but none are working in my case.

I need for a project to use gulp + browsersync with an apache vhost (created with MAMP PRO 5.5).

Gulp is working (it does all the tasks I need). Browsersync is set up but it opens my website on a different port that the one which is used by MAMP. I've tested with default Port and Mamp default port. Browsersync still opens the website with the correct url but not the correct port.

I understand that I can't use the same port but how can I set up Browsersync ?

Here is my gulp relevant part :

gulp.task('browser-sync', ['sass', 'scripts'], function () {
    browserSync.init({
        open: 'external',
        host: 'my-domain.dev',
        proxy: 'my-domain.dev',
        https: {
            key: "/Users/path-to-custom-certificate/my-domain.dev.key",
            cert: "/Users/path-to-custom-certificate/my-domain.dev.crt"
        },
        //port: 443, // If I try same port as MAMP, Browsersync increments this port ex 444
        browser: "google chrome"

    });
});

Mybe something can be configured in APACHE ?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

I hesitated to delete my question but in case it could helps :

Finally, it appears that my Browsersync code is correct. When I run gulp, it opens the wrong url with the Browsersync default port :

https://my-domain.dev:3000

But when I open the correct url (my-domain.dev) set in apache, Browsersync is connected and reloads that page.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda