Skip to content

Commit 191132f

Browse files
MK8S-25: Fix nginx root directory access with index.html
Add nginx root directory (/var/www/repositories/) to index.html creation for scality repository. This fixes the error: "directory index of /var/www/repositories/ is forbidden" The health check and nginx now have proper index.html files at all levels: - /var/www/repositories/index.html (nginx root) - /var/www/repositories/metalk8s-131.0.0-dev/index.html (saltenv root) - Repository-specific index.html files This ensures nginx can serve directory requests when autoindex is disabled.
1 parent d720372 commit 191132f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

buildchain/buildchain/targets/repository.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,10 @@ def _get_repository_directories(self) -> List[Path]:
252252
self.rootdir / self.ARCH, # Architecture directory (e.g., x86_64)
253253
]
254254

255+
# Add nginx root directory for scality repository
256+
if self.name == "scality":
257+
repository_directories.append(self._repo_root) # /var/www/repositories
258+
255259
# Add saltenv directories for scality repository
256260
saltenv_dir, top_saltenv_dir = self._get_saltenv_directories()
257261
if saltenv_dir and top_saltenv_dir:

0 commit comments

Comments
 (0)