How to host a website with Ngnix (TrueNas Scale)

Koloss42

Dabbler
Joined
Aug 21, 2023
Messages
21
I have a nginx docker installed and already started, on the dhcp port unfortunately nothing is displayed to me, but if I click on the app I can read from the log an ip address and there comes the standard ngnix website. How do I now link my website documents e.g. html with the docker container?
 

abdulwahab

Cadet
Joined
Oct 15, 2023
Messages
2
To host a website with Nginx on TrueNAS Scale using a Docker container, you'll need to mount your website documents, such as HTML files, to the Docker container. First, make sure your website files are available on the host system. Then, you can use Docker's volume mounting feature to link these documents to the Nginx container.

When you start the Nginx Docker container, include a volume flag in your Docker run command, specifying the path to your website documents on the host and the path inside the container where Nginx serves its web content (typically "/usr/share/nginx/html"). This way, your website documents will be accessible to Nginx, and your site should be viewable through the IP address you saw in the log.
 

DGTM

Dabbler
Joined
Dec 20, 2023
Messages
11
To host a website with Nginx on TrueNAS Scale using a Docker container, you'll need to mount your website documents, such as HTML files, to the Docker container. First, make sure your website files are available on the host system. Then, you can use Docker's volume mounting feature to link these documents to the Nginx container.

When you start the Nginx Docker container, include a volume flag in your Docker run command, specifying the path to your website documents on the host and the path inside the container where Nginx serves its web content (typically "/usr/share/nginx/html"). This way, your website documents will be accessible to Nginx, and your site should be viewable through the IP address you saw in the log.
Please, screenshots and step by step guide.
I am spending so much time now, reading and watching so much garbage and I am getting no where...
 
Top