Configure nginx web server

Hello people:

docker version
Client: Docker Engine - Community
 Version:           28.1.1
 API version:       1.49
 Go version:        go1.23.8
 Git commit:        4eba377
 Built:             Fri Apr 18 09:52:57 2025
 OS/Arch:           linux/amd64
 Context:           default

I should put a dinamic project online, i set nginx and everything went well.
I ask a guide if possible, because of i think my kernel is different than other kernels, so the folders inside the container are different too, and i can’t understand where i have to place code to connect index.html page to the server.
I mean the next code

server { listen myPort; listen [::]:myPort; server_name biotechproject.com; root /usr/share/nginx/html/biotechproject; index index.html; location / { try_files $uri $uri/ =404; } }

Below my nginx container

docker exec -it linuxdocker /bin/bash
root@61bfd8a504db:/# cd etc
root@61bfd8a504db:/etc# cd nginx
root@61bfd8a504db:/etc/nginx# cd conf.d
root@61bfd8a504db:/etc/nginx/conf.d#

docker exec -it linuxdocker bin/bash
root@61bfd8a504db:/# cd usr
root@61bfd8a504db:/usr# cd share
root@61bfd8a504db:/usr/share# cd nginx
root@61bfd8a504db:/usr/share/nginx# cd html
root@61bfd8a504db:/usr/share/nginx/html# cd biotechproject# ls
Biotech-file	   Cellula.html        Template.html
Biotechlearn.html  ProjectScript.html  index.html
root@61bfd8a504db:/usr/share/nginx/html/biotechproject# 

I don’t see how the kernel version would be relevant. as all containers are based on images which are the same regardless of the kernel of your host operating system.

So if you still need help, please share more details about the issue including what you expected to see in the browser as we have no way to tell if the shared screenshot shows the right output or not.

But if you only meant to ask about where to put your custom config in the nginx container, that depends on what image you are using and you haven’t shared anything about that. Here is the description of the official docke rimage of nginx

https://hub.docker.com/_/nginx

It shows how to use it.