Browse Source

init

tags/v1.0.0
Robin Thoni 5 years ago
commit
b46110e344
5 changed files with 110 additions and 0 deletions
  1. 6
    0
      .gitignore
  2. 31
    0
      apache/Dockerfile
  3. 60
    0
      apache/config/apache2.conf
  4. 4
    0
      apache/run.sh
  5. 9
    0
      docker-compose.yml

+ 6
- 0
.gitignore View File

@@ -0,0 +1,6 @@
1
+*.out
2
+*.aux
3
+*.log
4
+*.gz
5
+*.swp
6
+/.idea

+ 31
- 0
apache/Dockerfile View File

@@ -0,0 +1,31 @@
1
+FROM robinthoni/debian-multiarch:jessie
2
+
3
+# FROM https://github.com/ZHAJOR/Docker-Apache-2.4-Php-5.6-for-Laravel
4
+MAINTAINER Robin Thoni <robin@rthoni.com>
5
+
6
+RUN apt-get update && apt-get -y install\
7
+        apache2=2.4.*\
8
+        libapache2-mod-php5\
9
+        php5 &&\
10
+        apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
11
+
12
+RUN /usr/sbin/a2enmod rewrite &&\
13
+    rm -rf /var/www/html &&\
14
+    mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html &&\
15
+    chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html
16
+
17
+RUN rm -rf /var/log/* &&\
18
+    mkdir -p /var/log/apache2 &&\
19
+    ln -s /dev/stderr /var/log/apache2/error.log &&\
20
+    ln -s /dev/stdout /var/log/apache2/access.log &&\
21
+    ln -s /dev/stdout /var/log/apache2/other_vhosts_access.log
22
+
23
+COPY ./config/apache2.conf /etc/apache2/apache2.conf
24
+
25
+COPY ./wwwroot/ /var/www/html/
26
+
27
+COPY run.sh /usr/local/bin/run.sh
28
+
29
+EXPOSE 80
30
+
31
+CMD "/usr/local/bin/run.sh"

+ 60
- 0
apache/config/apache2.conf View File

@@ -0,0 +1,60 @@
1
+# see http://sources.debian.net/src/apache2/2.4.10-1/debian/config-dir/apache2.conf
2
+
3
+ServerName lldc.2drt.fr
4
+Mutex file:/var/lock/apache2 default
5
+PidFile /var/run/apache2/apache2.pid
6
+Timeout 300
7
+KeepAlive On
8
+MaxKeepAliveRequests 100
9
+KeepAliveTimeout 5
10
+User www-data
11
+Group www-data
12
+HostnameLookups Off
13
+ErrorLog /var/log/apache2/error.log
14
+LogLevel warn
15
+
16
+IncludeOptional mods-enabled/*.load
17
+IncludeOptional mods-enabled/*.conf
18
+
19
+# ports.conf
20
+Listen 80
21
+<IfModule ssl_module>
22
+    Listen 443
23
+</IfModule>
24
+<IfModule mod_gnutls.c>
25
+    Listen 443
26
+</IfModule>
27
+
28
+DocumentRoot "/var/www/html/"
29
+
30
+<Directory />
31
+    Options FollowSymLinks
32
+    AllowOverride None
33
+    Require all denied
34
+</Directory>
35
+
36
+<Directory /var/www/html/>
37
+    Options FollowSymLinks
38
+    AllowOverride All
39
+    Require all granted
40
+</Directory>
41
+
42
+
43
+
44
+LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
45
+LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
46
+LogFormat "%h %l %u %t \"%r\" %>s %O" common
47
+LogFormat "%{Referer}i -> %U" referer
48
+LogFormat "%{User-agent}i" agent
49
+
50
+CustomLog /var/log/apache2/access.log combined
51
+
52
+<FilesMatch \.php$>
53
+    SetHandler application/x-httpd-php
54
+</FilesMatch>
55
+
56
+# Multiple DirectoryIndex directives within the same context will add
57
+# to the list of resources to look for rather than replace
58
+# https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex
59
+DirectoryIndex disabled
60
+DirectoryIndex index.php index.html

+ 4
- 0
apache/run.sh View File

@@ -0,0 +1,4 @@
1
+#!/bin/bash
2
+
3
+rm -f /run/apache2/apache2.pid
4
+exec /usr/sbin/apache2ctl -D FOREGROUND

+ 9
- 0
docker-compose.yml View File

@@ -0,0 +1,9 @@
1
+version: '2'
2
+
3
+services:
4
+    apache:
5
+        build: ./apache
6
+        container_name: www.2drt.fr-apache
7
+#        restart: unless-stopped
8
+        ports:
9
+            - "127.0.0.1:35150:80"

Loading…
Cancel
Save