0

I'm a beginner to deploy application. I saw a lot of article that is written about deploying next.js app on Vercel or other servers that support next.js app. But I'm here because my next.js app can deploy and run on my server that I'm currently renting, but I can run the app only local host on the server. So when I access to the application I need to access such as "http://www.example.com:3000". How can I configure next.js app to run on such as "https://www.example.com"?

  • My server is installed apache2 and node.js16

  • Since my server is a rental server, I cannot run sudo command through ssh

  • I have custom domain and ssl certificate

  • Added "Homepage" property to package.json since it is required when react app is deployed

  • Tried to change apache config through ssh

  • Added "BasePath" property to next.config.js to route(This is probably not relevant)

1
  • The config of ssl certificate is correctly set already. I checked to make sure if I can access it by putting on index.html file Commented Mar 4, 2023 at 3:13

1 Answer 1

0

There could be an issue with the basepath property in the next.config. Js, so if you have it in there, you must remove before you deploy your app on the particular server. This is recommended because, if you have that, it may results in some issues relating to routing when running behind a reverse proxy.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.