shuaybi
Virtual path in URL when running phoenix locally
See whenever you run a phoenix app locally, the URL is always something like:
where 4100 is the port number I configured in my dev.exs
How can I make it so that the URL has some dummy virtual paths in it. For example:
http://localhost:4100/arch/myapp
The reason I want to do this is because in our company when we deploy our apps to production they have to be accessed through a proxy server. The proxy server maps a friendlier URL (without a port number) to the linux vm that is running the actual application. For example:
http://proxy.mycompany.com/arch/myapp => http://vmlinuxprd1:8080
The problem I am facing is that my app runs fine locally and all the URLS are resolved correctly. But fails in production.
I want to be able to simulate this problem locally so I can test my application when the URL has a few dummy virtual directories in the path. That way I am guaranteed that it will run fine in production by resolving all the relative URLs correctly in production.
Thank you!
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








