Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

377
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!