น้อมรำลึกในพระมหากรุณาธิคุณ และร่วมถวายความอาลัย สมเด็จพระนางเจ้าสิริกิติ์ พระบรมราชินีนาถ พระบรมราชชนนีพันปีหลวง เสด็จสวรรคต ด้วยสำนึกในพระมหากรุณาธิคุณหาที่สุดมิได้
075-845-490 | 097-165-2449
Line ID: @hostnakhonitech
🎉 โปรโมชั่นพิเศษ! ลด 10% สำหรับลูกค้าใหม่
NakhoniTech
075-845-490
support@NakhoniTech.com

subpath เส้นทางย่อย application Node.js shows error 404 หลังจากที่ปรับใช้ใน Plesk Control Panel Print

  • 0

Symptoms

  • Subpath of the website, e.g. example.com/api/test shows "error 404" in a web-browser.

  • A website also may show the following error:

    405 - HTTP verb used to access this page is not allowed

  • Node.js application is deployed using Node.js extension.

  • \api\test does not exist on a filesystem and should be generated dynamically via Node.js.

  • Web application works as expected when iisnode is not used, and the required path example.com:3000/api/test is available.

Cause

Node.js extension creates an URL rewrite rule in IIS as follows:

<rewrite>
<rules>
<rule name="startup-file">
<match url="^$" />
<action type="Rewrite" url="<?= htmlentities($this->startupFile) ?>" />
</rule>
</rules>
</rewrite>

The existing IIS rewrite rule is not compatible with the application.
This is a Bug in the Node.js extension #EXTNODEJS-46 which will be fixed in future product updates.

 

 

Change Pattern from ^$ to /* to route everything to Node.js Startup File.

 

 

อ้างอิงบทความจาก https://support.plesk.com/hc/en-us/articles/360010589619-Node-js-application-subpath-shows-error-404-after-being-deployed-in-Plesk

 

Was this answer helpful?

« Back