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.
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.
- Files: 644 or 640
- Directories: 755 or 750
.htaccess file
If your application’s code includes an .htaccess file, verify that any configuration directives in it are correct. For example, a misconfiguredRewrite
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: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 UnavailableIf 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: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.