Support the ongoing development of Laravel.io →
posted 10 years ago
Configuration
Last updated 2 years ago.
0

I made some good steps.

I can make a port forwarding on homestead.rb like:

config.vm.network "forwarded_port", guest: 4000, host: 4000

So I can run my angular app and I can access it via homestead.app:4000 or even localhost:4000. So far, so good.

To make angular proxy the requests to the laravel app, I proxy them to the port 80 and it works, but when I add another app, the angular app will then proxy to that new app.

Even when I can do

homestead.app:8000

or

app2.app:8000

And get different apps, seems like in the VM they both run on the port 80 so I can't tell my angular app what app to use as a proxy API.

Ideas?

Last updated 2 years ago.
0

I got the answer thanks to @trq at laravel irc channel.

I can use the hostname (homestead.app) and also the port so I get redirected to the app I need.

Fantastic.

Last updated 2 years ago.
0

Hi @Foxandxss,

Can you provide example for your (Homestead.yaml).. Thx.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Foxandxss foxandxss Joined 23 Aug 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.