Skip to content

Getting "Internal Server Error" when deployed "out folder" on cpanel. #40738

@ZeeshanAhmadKhalil

Description

@ZeeshanAhmadKhalil

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

  • "next": "12.2.5"

  • Node 16.17.0

  • npm 8.18.0

  • windows 10

What browser are you using? (if relevant)

chrome (or any other)

How are you deploying your application? (if relevant)

deploying on c-panel through next export

Describe the Bug

  1. After completing the application I used the following commands to generate files to deploy in out folder;
  • next build
  • next export
  1. I have added the following .htaccess in the out folder with the following code:
 <IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ — [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule . /index.html [L]
</IfModule>
  1. I uploaded all my files from out to public_html through Cpanel.

image

But i am getting 500 Internal Server Error when visiting website URL: https://disputeflare.esquall.com/

image

Expected Behavior

It should run the website on the server as it is running on localhost.

Link to reproduction

https://github.com/ZeeshanAhmadKhalil/next-upload-issue

To Reproduce

  1. npm install
  2. npm run build
  3. upload to Cpanel
  4. visit website URL to see 500 error

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue was opened via the bug report template.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions