Skip to content

Link 404 page in nginx #243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
StanFromIreland opened this issue Jan 24, 2025 · 2 comments
Closed

Link 404 page in nginx #243

StanFromIreland opened this issue Jan 24, 2025 · 2 comments

Comments

@StanFromIreland
Copy link
Contributor

Currently there is a 404 page in /templates/404.html however it is not linked in the nginx conf and the standard 404 page is displayed.

Image

@AA-Turner
Copy link
Member

The 404 page in templates/404.html is specifically for the download archives, see

def build_404(www_root: Path, group):
"""Build a nice 404 error page to display in case PDFs are not built yet."""
if not www_root.exists():
logging.info("Skipping 404 page generation (www root does not even exist).")
return
logging.info("Copying 404 page...")
not_found_file = www_root / "404.html"
shutil.copyfile(HERE / "templates" / "404.html", not_found_file)
not_found_file.chmod(0o664)
run(["chgrp", group, not_found_file])

A

@StanFromIreland
Copy link
Contributor Author

I see, there is still the issue of there being no 404 page for the general docs.python.org.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants