Running Laravel and Nuxt Application on Virtualmin

Operating system:Ubuntu
OS version:18.04

Hi guys. I managed to install laravel app on virtualmin in /home/*/public_html/ and it works fine. But I have another problem. I’m trying to figure out on how to run my nuxt app in apache, I only had experience on running it in nginx using proxy pass. I saw that apache2 also has proxy pass but its not working with me.

<VirtualHost *:80>
    ProxyPreserveHost On
    ProxyPass / http://127.0.0.1:3000/
    ProxyPassReverse / http://127.0.0.1:3000/
</VirtualHost>

I used pm2 to run my nuxt app and its running at http://127.0.0.1:3000. I want to run them both at the same time. Any tips? I’m not really familiar with apache guys, so please help me…

I don’t think I understand what Laravel has to do with your question. Why not ignore the part that is working?

Your problem is likely *:80. If you have any name-based VirtualHost sections, they will suck up all the requests.

1 Like

I manage to proxy pass my nuxt app. using

  <Location /test>
    allow from all
    Satisfy any
    ProxyPass http://localhost:3000/
    ProxyPassReverse http://localhost:3000/
  </Location>

my nuxt app is running on host.com/test
and my laravel api is running on host.com/api/public

How can I make my nuxt app to run on host.com ? without /test?
for some reason I cannot use Location / or LocationMatch “/”. I always need to include some unique words after /
I’m not sure how to configure it so please help me… Thanks…