GithubHelp home page GithubHelp logo

devdnsmasq's Introduction

Requirenments:

  • MacOs(but you can adapt it to linux)

What is this

My solution to run my own services/apps/projects on .dev or any domain I want, and moving from localhost:3000.

I run nginx on my host machine on port 80, based on the project I generate sites-enabled .config file.

Running dns server in docker with front facing nginx running on host:80

To use dnsmasq you need to setup your DNS server to localhost 127.0.0.1 as one of the servers.

  • If you want to use .dev TLD you need to install self sign certificate, mostly over the fact Chrome redirect automatically to https I created helper scripts for in cert folder. HOWEVER you don't need to use it if you use special .test.

Create self sign .dev or any TLD

Again, this is not necessary related to dnsmask

  1. go to cert and run
    • make gen 1genRootCAKey
  • more secure & sane version is to use pswd with this, but then full automation is harder
    • make gen genRootCAKeyPWD
  1. Now you need to self sign the root Certificate

    • make 2genRootCACert

    and fill all the information to identify yourself as CA(certify authority), mostly not important.

  2. Add your newly created certificate to key-chain in MAC

    • make addRootCA
  3. Create domain make gen domain.com

    • it will create certificate and paste it to domains

Keep in mind, after you create steps 1,2 & 3 for the next domain, you are doing any step 4.

Explanation:

  • myCertifyAuthority.key => this is private key for your Authority
  • myCertifyAuthority.cert => this is the root certificate generated based on your key, you create 'organization' with it

After having them both, you are 'tiny CA' and can sign certificates :)

SOURCES:

devdnsmasq's People

Contributors

ultrox avatar

Watchers

James Cloos avatar  avatar

devdnsmasq's Issues

When use make lazy

if you don't provide the domain the script still runs and provide no info about something went wrong, and SOMETHING went wrong. Mainly, it didn't copy or generated stuff to the right places

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.