After deploying your application, when you go to the applicationโ€™s URL, you may receive an HTTP status code identifying an issue with the server or client. This article explains how to resolve these status codes.

403 error

After deploying your application, if thereโ€™s an issue with file permissions or the workspace path, you may see the following or a similar error when you try to go to your applicationโ€™s URL:
403 Forbidden You donโ€™t have permission to access this resource.
This error is usually caused by one of the following:
  • Incorrect file permissions.
  • Incorrect configuration within an .htaccess file.
  • Configuration error in the workspace path in Apache configuration.
If you cannot identify the issue, check the following, and if the issue persists, contact our Support team.

File permissions

File permissions control who can:
  • Read:ย See the contents of a file or view files in a directory.
  • Write:ย Modify a file, or add or delete files in a directory.
  • Execute:ย Run a file and/or execute it as a script, or access a directory and perform functions and commands.
Each file and directory has its own set of file permissions, shown as a 3-digit number. Each number indicates the permission level for each category (read, write, and execute) shown above. We generally recommend the following permissions, but there could be cases where these need to be different for your application (e.g. some applications may need permissions on files to be set to 755 or 750):
  • Files:ย 644 or 640
  • Directories:ย 755 or 750
Make sure file permissions are set for your application. We recommend checking the documentation for your application, language, or framework if you are unsure.

.htaccess file

If your applicationโ€™s code includes an .htaccess file, verify that any configuration directives in it are correct. For example, a misconfigured Rewriteย or FilesMatchย directive can cause a 403 error.

Workspaceย path

If your application uses a buildpackย and an Apache web server, an incorrect workspace path in your Apache configuration can cause a 403 error. The application logsย may show an error similar to the following:
python: can'tย openย fileย '/workspace/server.py': [Errno 2] No such fileย orย directory
This error shows that the command the buildpack is trying to run doesnโ€™t exist. Update your Apache configuration to use /workspace/web/ย (instead of ย /workspace/ย or similar) to resolve this issue.

503 error

After a successful application deployment, if thereโ€™s an issue within the applicationโ€™s code or configuration, you may see the following error when you try to go to your applicationโ€™s URL:
503 Service Temporarily Unavailable
If you cannot identify the issue, check the following.

Workspace path

If your application uses a buildpack and an Apache web server, an incorrect workspace path in your Apache configuration can cause a 503 error. The application logsย may show an error similar to the following:
python: can'tย openย fileย '/workspace/server.py': [Errno 2] No such fileย orย directory
This error shows that the command the buildpack is trying to run doesnโ€™t exist. Update your Apache configuration to use /workspace/web/ย (instead of ย /workspace/ย or similar) to resolve this issue. Note:ย This issue may also present as an oom-killed error in the runtime logs (but it isnโ€™t the only possible cause of an oom-killedย error). If the error persists after checking and fixing any configuration issues, follow our Failed Deployment troubleshootingย guide. If the error remains beyond those steps, contact our Support team.