galaxyproject / galaxyproject/training-material
"404 Not Found" error when displaying datasets
- Dominant language
- HTML
- Stars
- 367
- Forks
- 1.1k
- Avg merge
- 16h 27m
- Merged PRs (30d)
- 49
Description
**Error**
After uploading a dataset the `dataset display` function ("eye icon") in the history column throws the error
```
404 Not Found
The resource could not be found.
No route for /_x_accel_redirect/data/datasets/1/3/e/dataset_xyz.dat
```
**Solution**
Add the following block to `templates/nginx/galaxy.j2` and rerun the playbook:
```
location /_x_accel_redirect/ {
internal;
alias /;
# Add upstream response headers that would otherwise be omitted
add_header Access-Control-Allow-Origin $upstream_http_access_control_allow_origin;
add_header Access-Control-Allow-Methods $upstream_http_access_control_allow_methods;
}
```
**Sources**
https://help.galaxyproject.org/t/404-not-found-error-no-route-for-x-accel-redirect/7507
https://docs.galaxyproject.org/en/master/admin/nginx.html#sending-files-with-nginx
**Tutorial**
https://github.com/galaxyproject/training-material/edit/main/topics/admin/tutorials/ansible-galaxy/tutorial.md
https://training.galaxyproject.org/training-material/topics/admin/tutorials/ansible-galaxy/tutorial.html#nginx
Contributor guide
Research direction
Start with the Ansible Galaxy tutorial's Nginx section and compare its instructions with templates/nginx/galaxy.j2 and the linked Galaxy Nginx documentation. Update the relevant tutorial guidance for the missing redirect configuration, then verify that the rendered tutorial clearly explains rerunning the playbook and resolves the dataset display error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nginx
- Domain
- documentation, infrastructure
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100