0

I'm making a project using nuxt 3, but there's one problem.

[What I did]

  1. Created a Nuxt 3 project.
  2. The project was built using the "npm run build" command.
  3. The built server was executed with the command "node.output/server/index.mjs".

If we go so far, "http://nuxt.randomdd.com:3000/" This URL allows you to view projects. However, I used IIS's URL rewrite function because I want to access through the "http://nuxt.randomdd.com" URL without port 3000.

enter image description here

then "http://nuxt.randomdd.com" You can also view the project through this URL.

However, there is a problem.

enter image description here

As shown in the image above, some files are not loading.

If you go to "http://nuxt.randomdd.com/_nuxt/entry.dd64dcb9.css" this URL, you can see that the page does not load.

i

As you can see in the image above, connecting using port 3000 does not cause any problems.

In the example above, there seems to be no major problem. In the actual project, there is a problem that the project does not work properly due to missing files. It's very hard for me.

How shall I do it?

I wrote down everything I tried in the above article.

user190245
  • 1,027
  • 1
  • 15
  • 31
  • Don't waste your time on URL rewriting, as HttpPlatformHandler supports Nuxt.js natively, https://halfblood.pro/running-nuxt-3-web-apps-on-iis-with-httpplatformhandler/ – Lex Li Feb 12 '23 at 19:31
  • Wow! The method you told me was the best help for my project. Thanks a lot! – zanzanguitar Feb 13 '23 at 06:00
  • The problem was completely solved by the method you told me, but I have one question. Why did the error occur with the URL rewrite method I tried? – zanzanguitar Feb 13 '23 at 06:04
  • You probably only configured inbound rules, which often is not enough to hook everything up. You need IIS+ARR and inbound/outbound rules together to create a reverse proxy, if you don't want to use HttpPlatformHandler. Thus, you can see which option suits you better. – Lex Li Feb 13 '23 at 07:03

0 Answers0