• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue After migration tool using for nodejs server

ergunaksoy

New Pleskian
Server operating system version
Debian 11
Plesk version and microupdate number
latest
After I migrated my nodejs server with migration tool of plesk, it gives this error :


AH01276: Cannot serve directory /var/www/vhosts/domain.com/httpdocs/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm,index.shtml) found, and server-generated directory index forbidden by Options directive

Node.js is installed, and in the previous plesk host, node.js web was running successfully, what could be a problem here?
 
Hello first,
Understanding the Error:

  • An Apache Web server could not find a suitable file to serve as the default page in this directory.
  • It's not finding any files with the extensions listed (index.html, index. cgi, etc.)
  • It is also prevented from automatically generating a directory list by the configuration.
Troubleshooting Steps:

  1. Review Server Configuration:
  • DirectoryIndex directive: Ensure index.js is included in the DirectoryIndex directive for your domain's configuration, usually found in Apache virtual host files (/etc/apache2/sites-enabled/*.conf). Add index.js if missing.
  • Options directive: Check for Options -Indexes or similar directives that might be preventing directory listings. If necessary, remove or modify them.
  1. Verify Node.js Application Structure:
    • Confirm that index.js is present in the /var/www/vhosts/domain.com/httpdocs/ directory.
    • Ensure the file is readable by the web server user (usually www-data or apache).
    • If your application uses a different entry point file, adjust the DirectoryIndex directive accordingly.
  2. Check Node.js Handler Configuration:
    • Ensure the Node.js handler is properly assigned in Plesk for your domain.
    • Review the handler configuration to verify it points to the correct Node.js application file or directory.
  3. Test Node.js Functionality:
    • Try accessing a specific Node.js route (e.g., domain.com/test-route) to isolate whether the issue is with the default index file or Node.js itself.
    • If routes work but the index file doesn't double-check the index file path and permissions.
Hope this is helpful.
 
Back
Top