Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

web20opensource/dockerizing

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dockerizing

En-docker your apache server in linux with configurable ssl support

###Prerequisites

Apache

Edit the Dockerfile

rename this mySite.com to your site domain (it's supposed to your SSL files are related to this domain name)

ENV APACHE_MY_CERT_NAME mySite.com

so for example must be

ENV APACHE_MY_CERT_NAME google.com

Also rename the mySite.com legend from the runIt files . Also would be good you set permission

  • chmod +x runIt
  • chmod +x etcFake/runIt

Then prepare the etcFake folder

You need to replace the files into the apache2/ssl only, with your own ssl certificates files so just replace mySite.com.crt, mySite.com.spachebundle.crt and mySite.com.key. (I'm using right now a great SSL certificate provided by https://github.com/coolaj86/nodejs-ssl-example/tree/master/certs thanks! @coolaj86)

Also consider changing permission on the ssl files

  • chmod 644 mySite.com.crt
  • chmod 644 mySite.com.apachebundle.crt
  • chmod 600 mySite.com.key

Dockerizing

Now from/since/inside the dockerizing folder do:

  • docker build .

(check the number like Successfully built 6160c269fa05)

  • docker tag 6160c269fa05 apache2:one
  • docker run -t -i --name apache2 -v /path/to/your/website:/var/www/ -v /path/to/the/dockerizing/etcFake:/root/ -p 80:80 -p 443:443 apache2:one

Boom ! You are done with your site enjoy!

great docker resources

www.kencochrane.net/blog/2013/08/the-docker-guidebook/#search

www.kimh.github.io/blog/en/docker/gotchas-in-writing-dockerfile-en/ https://app.lastbackend.com/signin#_

docker home page (www.docker.com)

Licensed by GPL v3

*Project created by Mario Ruiz *

About

Dockerize your apache2 with your own cert and private key ssl files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.