Nginx inside Docker Container | Host Website Using Docker & Nginx

preview_player
Показать описание
This is how you can host an HTML folder from your computer/server. This will allow local connections to view your website.

💥CloudWays COUPON CODE: BFCM4040
☝️☝️ USE THE EXCLUSIVE COUPON CODE ABOVE TO GET 40% OFF FOR 4 MONTHS💥along with 40 FREE migrations handled by our expert engineers (valid till 31st December, 2023).

💥Get $200 FREE Credits for signup. So, hurry up!💥

╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝

Port forwarding can be done to access the website from outside of your network but it is not recommended. If you want everyone to have access to the website, you can use cloudflare's reverse proxy which will let others connect to your site without the users directly connecting to your network.

Timestamps:
0:00 Explanation
0:42 Creating the Docker Compose File
4:55 Running the Docker Container
5:46 Accessing the Website
6:03 Nginx Configuration File (Optional)
6:31 Outro

#nginx #docker #dockertutorial #dockertutorials #cloudguru
Рекомендации по теме
Комментарии
Автор

💥CloudWays COUPON CODE: BFCM4040
☝☝ USE THE EXCLUSIVE COUPON CODE ABOVE TO GET 40% OFF FOR 4 MONTHS💥along with 40 FREE migrations handled by our expert engineers (valid till 31st December, 2023).


👉Get Digital Ocean ➜ digitalocean.pxf.io/ZQERvQ
💥Get $200 FREE Credits for signup. So, hurry up!💥

╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝

CloudGurus
Автор

With COPY command, docker copies everything from the current folder "." from the host machine, to the "usr/share/nginx/html" folder in the docker container.

bitpilot