4

First of all I am going to describe how my app works. I have a Vuejs powered ( using Quasar ) for the Front-End that needs to use SSR, so it will run on the server and as for the Back-End I am using a Laravel only as an API.

I am developing a SSR (Server Side Rendered) application using Quasar Framework. Basically I run the command quasar build --mode ssr which creates a folder dist/ssr/ where you need to go and run the following command npm run start which starts the application on the server side on localhost:3000 using Nodejs.

So my backend currently exists under http://localhost/api

The problem is that the js app runs under http://localhost:3000 and I need to have something like this http://localhost/app which actually must listen to internal port 3000, so I need to make a Reverse Proxy.

Update 1: Found out this video on youtube https://www.youtube.com/watch?v=_lPZjDL7ilU that done the trick but there are still issues. The reverse proxy worked by adding the following line in httpd.conf

ProxyPass /app http://localhost:3000/

Also make sure mod_proxy and http mode proxy are enabled. Everything works exect all the assets, for example:

Request URL: http://localhost/js/7.42617aaa.js Which should resolve to: http://localhost/app/dist/ssr/www/js/7.42617aaa.js I THINK

John Doe
  • 571
  • 1
  • 9
  • 26

0 Answers0