Git Product home page Git Product logo

apache-httpd's Introduction

Apache 2 Playground

Docker

$ docker build -t httpd-playground .
$ docker run --name httpd-instance -dit -p 8080:80 httpd-playground
$ docker run --name httpd-instance --rm -p 8080:80 httpd-playground

** docker run: -d : To start a container in detached mode

** docker run: -i : Keep STDIN open even if not attached

** docker run: _-t : Allocate a pseudo-tty

** docker run: --rm : By default a container’s file system persists even after the container exits. This makes debugging a lot easier (since you can inspect the final state) and you retain all your data by default. But if you are running short-term foreground processes, these container file systems can really pile up. If instead you’d like Docker to automatically clean up the container and remove the file system when the container exits, you can add the --rm flag

From the browser

vi /etc/hosts

...
127.0.0.1       localhost 
127.0.0.1       www.site1.domain.co.uk site1.domain.co.uk 
127.0.0.1       www.site2.domain.co.uk site2.domain.co.uk 
127.0.0.1       www.site3.domain.co.uk site3.domain.co.uk
127.0.0.1       www.site4.domain.co.uk site4.domain.co.uk
...

The following URLs should be valid:

Inside the container

$ docker exec -it httpd-instance /bin/bash

Apache home: /usr/local/apache2

Apache 2 configuration

ServerName localhost:80

Include conf/extra/httpd-vhosts.conf

Extra loaded modules:

DB

LoadModule authn_dbd_module modules/mod_authn_dbd.so
LoadModule dbd_module modules/mod_dbd.so

Proxy

LoadModule proxy_module modules/mod_proxy.
LoadModule proxy_http_module modules/mod_proxy_http.so

Listen -> https://httpd.apache.org/docs/current/bind.html

Password file creation:

$ htpasswd -c conf/auth/passwords user2

Add a user password:

$ htpasswd conf/auth/passwords user3

Clean up

$ docker rmi $(docker images -f "dangling=true" -q)

apache-httpd's People

Contributors

ctoxley avatar

Watchers

 avatar

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.