Coder Social home page Coder Social logo

docker-nginx's Introduction

This project is to run nginx via Docker, support https/ssl via Let's Encrypt.

中文文档

How to Use

  • Clone this project.
  • Use ./vhost.sh add your_domain.com to add your site.
    • Don't forget to configure the DNS, i.e.g, map your domain to ip of your server.
  • Add site source to ./www/your_domain.com/public.
  • Update site config file if necessary: ./nginx/conf.d/your_domain.com.conf.
  • Start docker: ./start.sh
  • Reload nginx after modify site config file: ./reload-nginx.sh.
  • Update ssl every week: ./renew-ssl.sh via crontab.

Introduce this Project

The folders and files:

  • nginx: nginx config file for your site.
  • www: site source files for your side. Each domain has its sub folder. Logs in www/log.
  • ssl: ssl config file, updated by Let's Encrypt.
  • vhost.sh: used to add or delete site.
  • compose.yaml: docker compose config file.
  • start.sh: run docker compose up to start project.
  • reload-nginx.sh: reload nginx after update site config file.
  • renew-ssl.sh: renew ssl file using Let's Encrypt.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.