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

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

 
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Demo ทดลองใช้งาน Plesk Control Panel

Demo Plesk Admin – 10 domains Login: admin Password: panel...

แก้ปัญหาลิงก์ภาษาไทย WordPress บน IIS หรือ Parallels Plesk

เปิดไฟล์ web.config ก็อปโค้ดด้านล่างไปวางแทน <?xml version="1.0" encoding="UTF-8"?>...

วิธีการเปลี่ยน IP ของ Plesk server?

How to change the IP address of Plesk server? Connect to the server using SSH. Generate a...

วิธี Update Disk Usage ใน Plesk?

Connect to the server via SSH or RDP. Use the statistics utility to calculate web page...