Jenson
Jenson
TTCTheo's Typesafe Cult
Created by Jenson on 7/15/2024 in #questions
How to add a next.js subdomain
I have a server with multiple directories under /var/www/html I access them via Apache. Basically you type: mydomain.com/app1 And then the index.html under var/www/html/app1 gets loaded Everything so far is working great. But now I wanted to add next.js With an appnext under var/www/html/appnext But next.js does not have an index.html. So if I use it dynamically, which I have to do, because I do a lot of database requests that change the data on the site, it finds no index.html and does not work. So I can only access the site via mydomain.com:3000. That is very ugly. I tried to add a Vhost but it did not work. I tried to add a ProxyPass but that did not work. Is there a better way? Or a good tutorial on how to do this? https://dev.to/digitalpollution/your-nextjs-app-your-environment-a-guide-to-deployment-10l This one did not help, and others like it did not help either.
1 replies