├── configs ├── php │ └── php.ini └── apache2 │ ├── ssl.conf │ └── httpd.conf ├── linkstack └── .gitignore ├── .github ├── dependabot.yml └── FUNDING.yml ├── docker-compose.yml ├── SECURITY.md ├── Dockerfile ├── docker-entrypoint.sh ├── autotest.sh ├── README.md └── LICENSE /configs/php/php.ini: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /linkstack/.gitignore: -------------------------------------------------------------------------------- 1 | # Place the LinkStack release files in here. 2 | 3 | * 4 | !.gitignore -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "docker" 4 | directory: "/" 5 | schedule: 6 | interval: "daily" 7 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: JulianPrieber 4 | patreon: JulianPrieber 5 | liberapay: LinkStack 6 | custom: [paypal.me/JulianPrieber, buymeacoffee.com/JulianPrieber] 7 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | 3 | services: 4 | linkstack: 5 | hostname: 'linkstack' 6 | image: 'linkstackorg/linkstack:latest' 7 | environment: 8 | TZ: 'Europe/Berlin' 9 | SERVER_ADMIN: 'admin@example.com' 10 | HTTP_SERVER_NAME: 'example.com' 11 | HTTPS_SERVER_NAME: 'example.com' 12 | LOG_LEVEL: 'info' 13 | PHP_MEMORY_LIMIT: '256M' 14 | UPLOAD_MAX_FILESIZE: '8M' 15 | volumes: 16 | - '/htdocs' 17 | ports: 18 | - '8080:80' 19 | - '8081:443' 20 | restart: unless-stopped 21 | user: apache:apache 22 | # read_only: true 23 | depends_on: 24 | - mysql 25 | links: 26 | - mysql 27 | mysql: 28 | image: mysql:8 29 | environment: 30 | MYSQL_ROOT_PASSWORD: xeFgUGb5mPPn5q2d 31 | ports: 32 | - 3306:3306 33 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## About 4 | 5 | The security of this application is left to the user. This application is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. The user is responsible for ensuring the security of their own system and data when using this application. 6 | 7 | 8 | ## Reporting a Vulnerability 9 | 10 | If you believe you have found a security vulnerability in this project, please contact the developer at [`linkstackorg@gmail.com`](mailto:linkstackorg@gmail.com). Include as much detail as possible about the potential issue, including the version of the project you are using. Thank you for helping to keep LinkStack secure! 11 | 12 |
13 | 14 | *For any questions regarding this please contact: [`linkstackorg@gmail.com`](mailto:linkstackorg@gmail.com)* 15 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.22.2 2 | LABEL maintainer="JulianPrieber" 3 | LABEL description="LinkStack Docker" 4 | 5 | EXPOSE 80 443 6 | 7 | # Setup apache and php 8 | RUN apk --no-cache --update \ 9 | add apache2 \ 10 | apache2-ssl \ 11 | curl \ 12 | php83-apache2 \ 13 | php83-bcmath \ 14 | php83-bz2 \ 15 | php83-calendar \ 16 | php83-common \ 17 | php83-ctype \ 18 | php83-curl \ 19 | php83-dom \ 20 | php83-fileinfo \ 21 | php83-gd \ 22 | php83-iconv \ 23 | php83-json \ 24 | php83-mbstring \ 25 | php83-mysqli \ 26 | php83-mysqlnd \ 27 | php83-openssl \ 28 | php83-pdo_mysql \ 29 | php83-pdo_pgsql \ 30 | php83-pdo_sqlite \ 31 | php83-phar \ 32 | php83-session \ 33 | php83-xml \ 34 | php83-tokenizer \ 35 | php83-zip \ 36 | php83-xmlwriter \ 37 | php83-redis \ 38 | tzdata \ 39 | && mkdir /htdocs 40 | 41 | COPY linkstack /htdocs 42 | COPY configs/apache2/httpd.conf /etc/apache2/httpd.conf 43 | COPY configs/apache2/ssl.conf /etc/apache2/conf.d/ssl.conf 44 | COPY configs/php/php.ini /etc/php83/conf.d/40-custom.ini 45 | 46 | RUN chown apache:apache /etc/ssl/apache2/server.pem 47 | RUN chown apache:apache /etc/ssl/apache2/server.key 48 | 49 | RUN chown -R apache:apache /htdocs 50 | RUN find /htdocs -type d -print0 | xargs -0 chmod 0755 51 | RUN find /htdocs -type f -print0 | xargs -0 chmod 0644 52 | 53 | COPY --chmod=0755 docker-entrypoint.sh /usr/local/bin/ 54 | 55 | RUN chmod -R 755 /etc/php83 && \ 56 | chown -R apache:apache /etc/php83 57 | 58 | 59 | USER apache:apache 60 | 61 | HEALTHCHECK CMD curl -f http://localhost -A "HealthCheck" || exit 1 62 | 63 | # Set console entry path 64 | WORKDIR /htdocs 65 | 66 | CMD ["docker-entrypoint.sh"] 67 | -------------------------------------------------------------------------------- /docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Exit on non defined variables and on non zero exit codes 4 | set -eu 5 | 6 | # + ---------- + # 7 | # | -- VARS -- | # 8 | # + ---------- + # 9 | 10 | export SERVER_ADMIN="${SERVER_ADMIN:-you@example.com}" 11 | export HTTP_SERVER_NAME="${HTTP_SERVER_NAME:-localhost}" 12 | export HTTPS_SERVER_NAME="${HTTPS_SERVER_NAME:-localhost}" 13 | export LOG_LEVEL="${LOG_LEVEL:-info}" 14 | export TZ="${TZ:-UTC}" 15 | export PHP_MEMORY_LIMIT="${PHP_MEMORY_LIMIT:-256M}" 16 | export UPLOAD_MAX_FILESIZE="${UPLOAD_MAX_FILESIZE:-8M}" 17 | 18 | # Read Current LLC Version 19 | # When version.json has CR/LF, it fx up, so have to add tr to remove the line endings. 20 | v="$(cat /htdocs/version.json | tr -d '\r\n')" 21 | 22 | # Calc length of whitespace we need, based on version length. 23 | vlen="$((27-${#v}))" 24 | 25 | echo '+ ------------------------------------------------------------------ +' 26 | printf '| LINKSTACK v%s%*s|\n' "${v}" "$vlen" | tr ' ' " " 27 | 28 | # + ---------------- + # 29 | # | -- HTTPD.CONF -- | # 30 | # + ---------------- + # 31 | 32 | echo '+ ------------------------------------------------------------------ +' 33 | echo '| Updating Configuration: Apache Base (/etc/apache2/httpd.conf) |' 34 | echo '| Updating Configuration: Apache SSL (/etc/apache2/conf.d/ssl.conf) |' 35 | 36 | # + ------------- + # 37 | # | -- PHP.INI -- | # 38 | # + ------------- + # 39 | 40 | echo '| Updating Configuration: PHP (/etc/php83/40-custom.ini) |' 41 | echo "| Setting PHP Configuration: |" 42 | echo "| upload_max_filesize = ${UPLOAD_MAX_FILESIZE} |" 43 | echo "| memory_limit = ${PHP_MEMORY_LIMIT} |" 44 | echo "| date.timezone = ${TZ} |" 45 | 46 | echo "upload_max_filesize = ${UPLOAD_MAX_FILESIZE}" >> /etc/php83/conf.d/40-custom.ini 47 | echo "memory_limit = ${PHP_MEMORY_LIMIT}" >> /etc/php83/conf.d/40-custom.ini 48 | echo "date.timezone = ${TZ}" >> /etc/php83/conf.d/40-custom.ini 49 | 50 | # + ---------- + # 51 | # | -- MISC -- | # 52 | # + ---------- + # 53 | 54 | # Apache gets grumpy about PID files pre-existing 55 | rm -f /htdocs/httpd.pid 56 | echo '| Updating Configuration: Complete |' 57 | echo '| ------------------------------------------------------------------ |' 58 | echo '| Running Apache |' 59 | echo '+ ------------------------------------------------------------------ +' 60 | echo 61 | 62 | httpd -D FOREGROUND -------------------------------------------------------------------------------- /autotest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Exit on non defined variables and on non zero exit codes 4 | set -eu 5 | 6 | echo 'Building the container' 7 | 8 | docker build ./ -t alpine-apache-php-ci:latest 9 | 10 | NET="${DOCKER_NETWORK:-alpine-apache-php-autotest}" 11 | 12 | # use failure to switch on create 13 | docker network inspect ${NET} 1>/dev/null 2> /dev/null || docker network create ${NET} 14 | 15 | echo 'Preparing test folder' 16 | 17 | TMP_DIR="$(mktemp -d --suffix alpine-apache-php)" 18 | 19 | printf " "${TMP_DIR}/index.php" 26 | 27 | chmod 777 "${TMP_DIR}" 28 | chmod 666 "${TMP_DIR}/index.php" 29 | 30 | echo 'Running test containers' 31 | 32 | # stop if exists or silently exit 33 | docker stop alpine-apache-php-test 1>/dev/null 2> /dev/null || echo '' >/dev/null 34 | 35 | docker run --rm --detach \ 36 | --name alpine-apache-php-test \ 37 | --network ${NET} \ 38 | --volume ${TMP_DIR}:/htdocs \ 39 | --env HTTP_SERVER_NAME="www.example.xyz" \ 40 | --env HTTPS_SERVER_NAME="www.example.xyz" \ 41 | --env SERVER_ADMIN="admin@example.xyz" \ 42 | --env TZ="Europe/Paris" \ 43 | --env PHP_MEMORY_LIMIT="512M" \ 44 | alpine-apache-php-ci:latest 1>/dev/null 45 | 46 | 47 | # stop if exists or silently exit 48 | docker stop alpine-apache-php-test-normal 1>/dev/null 2> /dev/null || echo '' >/dev/null 49 | 50 | docker run --rm --detach \ 51 | --name alpine-apache-php-test-normal \ 52 | --network ${NET} \ 53 | --volume ${TMP_DIR}:/htdocs \ 54 | alpine-apache-php-ci:latest 1>/dev/null 55 | 56 | echo '' 57 | echo 'Running custom tests' 58 | 59 | docker run --rm --network ${NET} curlimages/curl:latest -s -k https://alpine-apache-php-test -H 'Host: www.example.xyz' 60 | docker run --rm --network ${NET} curlimages/curl:latest -s http://alpine-apache-php-test 61 | docker run --rm --network ${NET} curlimages/curl:latest -s -k https://alpine-apache-php-test 62 | 63 | echo '' 64 | echo 'Running normal tests' 65 | 66 | docker run --rm --network ${NET} curlimages/curl:latest -s -k https://alpine-apache-php-test-normal -H 'Host: www.example.xyz' 67 | docker run --rm --network ${NET} curlimages/curl:latest -s http://alpine-apache-php-test-normal 68 | docker run --rm --network ${NET} curlimages/curl:latest -s -k https://alpine-apache-php-test-normal 69 | 70 | echo '' 71 | echo 'Cleaning up' 72 | docker stop alpine-apache-php-test 1>/dev/null 73 | docker stop alpine-apache-php-test-normal 1>/dev/null 74 | docker network rm ${NET} 1>/dev/null 75 | 76 | rm "${TMP_DIR}/index.php" 77 | rmdir "${TMP_DIR}" 78 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 |
3 | 4 | 5 | 6 | 7 |

8 | 9 |

Docker Edition


10 |

Pull, deploy, enjoy!


11 | 12 |

13 | About • 14 | About LinkStack • 15 | Pull • 16 | Supported Architectures • 17 | Deployment • 18 | Updating • 19 | Build • 20 | Persistent storage • 21 | Reverse Proxy 22 |


23 | 24 |

25 | Live Demo 26 |

27 | 28 |

29 | 30 | 31 | 32 | 33 |

34 | 35 |

36 | Docker Hub 37 |

38 | 39 | 40 | ## About 41 | 42 | The official docker version of [LinkStack](https://github.com/linkstackorg/linkstack). This docker image is a simple to set up solution, containing everything you need to run LinkStack. 43 | 44 | The docker version of LinkStack retains all the features and customization options of the [original version](https://github.com/linkstackorg/linkstack). 45 | 46 | This docker is based on [Alpine Linux](https://www.alpinelinux.org/), a Linux distribution designed to be small, simple and secure. The web server is running [Apache2](https://www.apache.org/), a free and open-source cross-platform web server software. The docker comes with [PHP 8.3](https://www.php.net/releases/8.3/en.php) for high compatibility and performance. 47 | 48 | #### Using the docker is as simple as pulling and deploying. 49 | 50 |
51 | 52 | 53 | ## About LinkStack 54 | 55 |

56 | 57 | 58 | 59 | 60 | 61 | 62 |

63 | 64 |

65 | LinkStack is a highly customizable link sharing platform with an intuitive, easy to use user interface. 66 | 67 |

LinkStack allows you to create a personal profile page. Many social media platforms only allow for one link. With this, you can have all the links you want clickable on one site. Set up your personal site on your own server in a few clicks.

68 |

69 | 70 |
71 | 72 |

73 | Learn more about LinkStack, and all the features here: 74 |

75 | 76 |
77 | 78 |

79 | About LinkStack 80 |

81 | 82 |
83 | 84 | 85 | ## Pull 86 | 87 | ```shell 88 | docker pull linkstackorg/linkstack 89 | ``` 90 | 91 |
92 | 93 | Alternative mirror: 94 | 95 | ```shell 96 | docker pull ghcr.io/linkstackorg/linkstack 97 | ``` 98 | 99 |
100 | 101 | 102 | ## Supported Architectures 103 | 104 | - [`linux/amd64`](https://hub.docker.com/r/linkstackorg/linkstack/tags) 105 | - [`linux/arm/v6`](https://hub.docker.com/r/linkstackorg/linkstack/tags) 106 | - [`linux/arm/v7`](https://hub.docker.com/r/linkstackorg/linkstack/tags) 107 | - [`linux/arm64`](https://hub.docker.com/r/linkstackorg/linkstack/tags) 108 | 109 |
110 | 111 | 112 | ## Deployment 113 | 114 | You may change port *80*, *443* to your preferred values. 115 | 116 | Both HTTP and HTTPS are supported and exposed by default. 117 | 118 | ### Optional environment variables 119 | 120 | - `SERVER_ADMIN` (the email, defaults to `you@example.com`) 121 | - `HTTP_SERVER_NAME` (the [server name](https://httpd.apache.org/docs/2.4/fr/mod/core.html#servername), defaults to `localhost`) 122 | - `HTTPS_SERVER_NAME` (the [server name](https://httpd.apache.org/docs/2.4/fr/mod/core.html#servername), defaults to `localhost`) 123 | - `LOG_LEVEL` (the [log level](https://httpd.apache.org/docs/2.4/fr/mod/core.html#loglevel), defaults to `info`) 124 | - `TZ` (the [timezone](https://www.php.net/manual/timezones.php), defaults to `UTC`) 125 | - `PHP_MEMORY_LIMIT` (the [memory-limit](https://www.php.net/manual/ini.core.php#ini.memory-limit), defaults to `256M`) 126 | - `UPLOAD_MAX_FILESIZE` (the [upload_max_filesize](https://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize), defaults to `8M`) 127 | 128 |
129 | 130 | #### Deploy 131 | 132 |
133 | Read more about persistent storage 134 | 135 |
136 | 137 | **Create a new volume:** 138 |
docker volume create linkstack
139 | 140 |
141 | 142 |
143 | docker run --detach \
144 |     --name linkstack \
145 |     --publish 80:80 \
146 |     --publish 443:443 \
147 |     --restart unless-stopped \
148 |     --mount source=linkstack,target=/htdocs \
149 |     linkstackorg/linkstack
150 | 
151 | 152 |
153 | 154 | #### Custom deployment 155 | 156 |
157 | docker run --detach \
158 |     --name linkstack \
159 |     --hostname linkstack \
160 |     --env HTTP_SERVER_NAME="www.example.xyz" \
161 |     --env HTTPS_SERVER_NAME="www.example.xyz" \
162 |     --env SERVER_ADMIN="admin@example.xyz" \
163 |     --env TZ="Europe/Berlin" \
164 |     --env PHP_MEMORY_LIMIT="512M" \
165 |     --env UPLOAD_MAX_FILESIZE="16M" \
166 |     --publish 80:80 \
167 |     --publish 443:443 \
168 |     --restart unless-stopped \
169 |     --mount source=linkstack,target=/htdocs \
170 |     linkstackorg/linkstack
171 | 
172 | 173 |
174 | 175 | #### Docker Compose 176 | Use HTTPS for your reverse proxy to avoid issues
177 | Example config. 178 | 179 |
180 | version: "3.8"
181 | 
182 | services:
183 | 
184 |   linkstack:
185 |     hostname: 'linkstack'
186 |     image: 'linkstackorg/linkstack:latest'
187 |     environment:
188 |       TZ: 'Europe/Berlin'
189 |       SERVER_ADMIN: 'admin@example.com'
190 |       HTTP_SERVER_NAME: 'example.com'
191 |       HTTPS_SERVER_NAME: 'example.com'
192 |       LOG_LEVEL: 'info'
193 |       PHP_MEMORY_LIMIT: '256M'
194 |       UPLOAD_MAX_FILESIZE: '8M'
195 |     volumes:
196 |       - 'linkstack_data:/htdocs'
197 |     ports:
198 |       - '8190:443'
199 |     restart: unless-stopped
200 | 
201 | volumes:
202 |   linkstack_data:
203 | 
204 | 205 |
206 | 207 | 208 | ## Updating 209 | 210 | When a **new version** is released, you will get an update notification on your Admin Panel. 211 | 212 | ### Automatic one click Updater 213 | This updater allows you to update your installation with just one click. 214 | 215 |
216 | 217 | **How to use the Automatic Updater:** 218 | 219 | - To update your instance, click on the update notification on your Admin Panel. 220 | 221 | - Click on “Update automatically” and the updater will take care of the rest. 222 | 223 |
224 | 225 | 226 | ## Build 227 | 228 | **If you wish to build or modify your own docker version of LinkStack, you can do so with the instructions below:** 229 | 230 | - Download this GitHub repository as well as the latest release of LinkStack from [here](https://github.com/linkstackorg/linkstack/releases/latest/download/linkstack.zip). 231 | - Place the downloaded release files directly into the linkstack folder from [this repository](https://github.com/linkstackorg/linkstack-docker/archive/refs/heads/main.zip). 232 | 233 | From the docker directory, run the command: 234 |
235 | docker build -t linkstack .
236 | 
You can now set up your application on your defined ports. 237 | 238 |
239 | 240 | 241 | ## Persistent storage 242 | 243 | Persistent storage for docker containers is storage that is **not** lost when the container is stopped or removed. 244 | 245 | This is advantageous since it means that data may be saved even if the container is removed. This is especially crucial when dealing with data that must be retained throughout restarts, such as a database. 246 | 247 | 248 | All files important to run LinkStack are stored in the "htdocs" folder found in the root directory of your docker container. 249 | 250 | We recommend mounting that entire folder to an external volume. 251 | 252 |
253 | 254 | **However, some user may prefer to preserve only individual files.**
255 | _Expand the details section below to read more about this:_ 256 | 257 |
258 | If you wish to save only selective files, you may save the following files and folders: 259 | 260 | ``` 261 | /htdocs/.env 262 | /htdocs/database/database.sqlite 263 | /htdocs/config/advanced-config.php 264 | /htdocs/assets/linkstack/images/avatar.png 265 | /htdocs/themes (folder) 266 | /htdocs/assets/img (folder) 267 | ``` 268 | 269 | **This might change with future releases.** 270 |
271 | 272 |
273 | 274 | 275 | ## Reverse Proxy 276 | 277 | ### NGINX: 278 | 279 | **Below is an example NGINX setup for a reverse proxy.**
280 | Make sure to use HTTPS to access your container to avoid mixed content errors 281 |
282 | 
283 | server {
284 |   listen        443 ssl;
285 |   listen        [::]:443 ssl;
286 |   listen        80;
287 |   listen        [::]:80;
288 |   server_name   your.domain.name;
289 | 
290 |   location / {
291 |     # Replace with the IP address and port number of your Docker container.
292 |     proxy_pass                          https://127.0.0.1:443;
293 |     proxy_set_header Host               $host;
294 |     proxy_set_header X-Real-IP          $remote_addr;
295 | 
296 |     proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
297 |     proxy_set_header X-Forwarded-Proto  https;
298 |     proxy_set_header X-VerifiedViaNginx yes;
299 |     proxy_read_timeout                  60;
300 |     proxy_connect_timeout               60;
301 |     proxy_redirect                      off;
302 | 
303 |     # Specific for websockets: force the use of HTTP/1.1 and set the Upgrade header
304 |     proxy_http_version 1.1;
305 |     proxy_set_header Upgrade $http_upgrade;
306 |     proxy_set_header Connection 'upgrade';
307 |     proxy_cache_bypass $http_upgrade;
308 |     proxy_set_header X-Forwarded-Proto $scheme;
309 |     
310 |     # Fixes Mixed Content errors.
311 |     add_header 'Content-Security-Policy' 'upgrade-insecure-requests';
312 |   }
313 | }
314 | 
315 | 
316 | 317 |
318 |
319 | -------------------------------------------------------------------------------- /configs/apache2/ssl.conf: -------------------------------------------------------------------------------- 1 | # 2 | # This is the Apache server configuration file providing SSL support. 3 | # It contains the configuration directives to instruct the server how to 4 | # serve pages over an https connection. For detailed information about these 5 | # directives see 6 | # 7 | # Do NOT simply read the instructions in here without understanding 8 | # what they do. They're here only as hints or reminders. If you are unsure 9 | # consult the online docs. You have been warned. 10 | # 11 | # Required modules: mod_log_config, mod_setenvif, mod_ssl, 12 | # socache_shmcb_module (for default value of SSLSessionCache) 13 | LoadModule ssl_module modules/mod_ssl.so 14 | LoadModule socache_shmcb_module modules/mod_socache_shmcb.so 15 | 16 | # 17 | # Pseudo Random Number Generator (PRNG): 18 | # Configure one or more sources to seed the PRNG of the SSL library. 19 | # The seed data should be of good random quality. 20 | # WARNING! On some platforms /dev/random blocks if not enough entropy 21 | # is available. This means you then cannot use the /dev/random device 22 | # because it would lead to very long connection times (as long as 23 | # it requires to make more entropy available). But usually those 24 | # platforms additionally provide a /dev/urandom device which doesn't 25 | # block. So, if available, use this one instead. Read the mod_ssl User 26 | # Manual for more details. 27 | # 28 | #SSLRandomSeed startup file:/dev/random 512 29 | SSLRandomSeed startup file:/dev/urandom 512 30 | SSLRandomSeed connect builtin 31 | #SSLRandomSeed connect file:/dev/random 512 32 | #SSLRandomSeed connect file:/dev/urandom 512 33 | 34 | 35 | # 36 | # When we also provide SSL we have to listen to the 37 | # standard HTTP port (see above) and to the HTTPS port 38 | # 39 | Listen 443 40 | 41 | ## 42 | ## SSL Global Context 43 | ## 44 | ## All SSL configuration in this context applies both to 45 | ## the main server and all SSL-enabled virtual hosts. 46 | ## 47 | 48 | # SSL Cipher Suite: 49 | # List the ciphers that the client is permitted to negotiate, 50 | # and that httpd will negotiate as the client of a proxied server. 51 | # See the OpenSSL documentation for a complete list of ciphers, and 52 | # ensure these follow appropriate best practices for this deployment. 53 | # httpd 2.2.30, 2.4.13 and later force-disable aNULL, eNULL and EXP ciphers, 54 | # while OpenSSL disabled these by default in 0.9.8zf/1.0.0r/1.0.1m/1.0.2a. 55 | SSLCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES:!ADH 56 | SSLProxyCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES:!ADH 57 | 58 | # By the end of 2016, only TLSv1.2 ciphers should remain in use. 59 | # Older ciphers should be disallowed as soon as possible, while the 60 | # kRSA ciphers do not offer forward secrecy. These changes inhibit 61 | # older clients (such as IE6 SP2 or IE8 on Windows XP, or other legacy 62 | # non-browser tooling) from successfully connecting. 63 | # 64 | # To restrict mod_ssl to use only TLSv1.2 ciphers, and disable 65 | # those protocols which do not support forward secrecy, replace 66 | # the SSLCipherSuite and SSLProxyCipherSuite directives above with 67 | # the following two directives, as soon as practical. 68 | # SSLCipherSuite HIGH:MEDIUM:!SSLv3:!kRSA 69 | # SSLProxyCipherSuite HIGH:MEDIUM:!SSLv3:!kRSA 70 | 71 | # User agents such as web browsers are not configured for the user's 72 | # own preference of either security or performance, therefore this 73 | # must be the prerogative of the web server administrator who manages 74 | # cpu load versus confidentiality, so enforce the server's cipher order. 75 | SSLHonorCipherOrder on 76 | 77 | # SSL Protocol support: 78 | # List the protocol versions which clients are allowed to connect with. 79 | # Disable SSLv3 by default (cf. RFC 7525 3.1.1). TLSv1 (1.0) should be 80 | # disabled as quickly as practical. By the end of 2016, only the TLSv1.2 81 | # protocol or later should remain in use. 82 | SSLProtocol all -SSLv3 83 | SSLProxyProtocol all -SSLv3 84 | 85 | # Pass Phrase Dialog: 86 | # Configure the pass phrase gathering process. 87 | # The filtering dialog program (`builtin' is an internal 88 | # terminal dialog) has to provide the pass phrase on stdout. 89 | SSLPassPhraseDialog builtin 90 | 91 | # Inter-Process Session Cache: 92 | # Configure the SSL Session Cache: First the mechanism 93 | # to use and second the expiring timeout (in seconds). 94 | #SSLSessionCache "dbm:/run/apache2/ssl_scache" 95 | SSLSessionCache "shmcb:/var/cache/mod_ssl/scache(512000)" 96 | SSLSessionCacheTimeout 300 97 | 98 | # OCSP Stapling (requires OpenSSL 0.9.8h or later) 99 | # 100 | # This feature is disabled by default and requires at least 101 | # the two directives SSLUseStapling and SSLStaplingCache. 102 | # Refer to the documentation on OCSP Stapling in the SSL/TLS 103 | # How-To for more information. 104 | # 105 | # Enable stapling for all SSL-enabled servers: 106 | #SSLUseStapling On 107 | 108 | # Define a relatively small cache for OCSP Stapling using 109 | # the same mechanism that is used for the SSL session cache 110 | # above. If stapling is used with more than a few certificates, 111 | # the size may need to be increased. (AH01929 will be logged.) 112 | #SSLStaplingCache "shmcb:/run/apache2/ssl_stapling(32768)" 113 | 114 | # Seconds before valid OCSP responses are expired from the cache 115 | #SSLStaplingStandardCacheTimeout 3600 116 | 117 | # Seconds before invalid OCSP responses are expired from the cache 118 | #SSLStaplingErrorCacheTimeout 600 119 | 120 | ## 121 | ## SSL Virtual Host Context 122 | ## 123 | 124 | 125 | 126 | # General setup for the virtual host 127 | DocumentRoot "/htdocs" 128 | PassEnv HTTP_SERVER_NAME 129 | ServerName ${HTTP_SERVER_NAME} 130 | 131 | PassEnv SERVER_ADMIN 132 | ServerAdmin ${SERVER_ADMIN} 133 | 134 | ErrorLog /dev/stderr 135 | #TransferLog "logs/ssl-transfer.log" 136 | PassEnv LOG_LEVEL 137 | LogLevel ${LOG_LEVEL} 138 | 139 | # SSL Engine Switch: 140 | # Enable/Disable SSL for this virtual host. 141 | SSLEngine on 142 | 143 | # Server Certificate: 144 | # Point SSLCertificateFile at a PEM encoded certificate. If 145 | # the certificate is encrypted, then you will be prompted for a 146 | # pass phrase. Note that a kill -HUP will prompt again. Keep 147 | # in mind that if you have both an RSA and a DSA certificate you 148 | # can configure both in parallel (to also allow the use of DSA 149 | # ciphers, etc.) 150 | # Some ECC cipher suites (http://www.ietf.org/rfc/rfc4492.txt) 151 | # require an ECC certificate which can also be configured in 152 | # parallel. 153 | SSLCertificateFile /etc/ssl/apache2/server.pem 154 | #SSLCertificateFile /etc/ssl/apache2/server-dsa.pem 155 | #SSLCertificateFile /etc/ssl/apache2/server-ecc.pem 156 | 157 | # Server Private Key: 158 | # If the key is not combined with the certificate, use this 159 | # directive to point at the key file. Keep in mind that if 160 | # you've both a RSA and a DSA private key you can configure 161 | # both in parallel (to also allow the use of DSA ciphers, etc.) 162 | # ECC keys, when in use, can also be configured in parallel 163 | SSLCertificateKeyFile /etc/ssl/apache2/server.key 164 | #SSLCertificateKeyFile /etc/ssl/apache2/server-dsa.key 165 | #SSLCertificateKeyFile /etc/ssl/apache2/server-ecc.key 166 | 167 | # Server Certificate Chain: 168 | # Point SSLCertificateChainFile at a file containing the 169 | # concatenation of PEM encoded CA certificates which form the 170 | # certificate chain for the server certificate. Alternatively 171 | # the referenced file can be the same as SSLCertificateFile 172 | # when the CA certificates are directly appended to the server 173 | # certificate for convenience. 174 | #SSLCertificateChainFile /etc/ssl/apache2/server-ca.pem 175 | 176 | # Certificate Authority (CA): 177 | # Set the CA certificate verification path where to find CA 178 | # certificates for client authentication or alternatively one 179 | # huge file containing all of them (file must be PEM encoded) 180 | # Note: Inside SSLCACertificatePath you need hash symlinks 181 | # to point to the certificate files. Use the provided 182 | # Makefile to update the hash symlinks after changes. 183 | #SSLCACertificatePath /etc/ssl/apache2/ssl.crt 184 | #SSLCACertificateFile /etc/ssl/apache2/ssl.crt/ca-bundle.pem 185 | 186 | # Certificate Revocation Lists (CRL): 187 | # Set the CA revocation path where to find CA CRLs for client 188 | # authentication or alternatively one huge file containing all 189 | # of them (file must be PEM encoded). 190 | # The CRL checking mode needs to be configured explicitly 191 | # through SSLCARevocationCheck (defaults to "none" otherwise). 192 | # Note: Inside SSLCARevocationPath you need hash symlinks 193 | # to point to the certificate files. Use the provided 194 | # Makefile to update the hash symlinks after changes. 195 | #SSLCARevocationPath /etc/ssl/apache2/ssl.crl 196 | #SSLCARevocationFile /etc/ssl/apache2/ssl.crl/ca-bundle.crl 197 | #SSLCARevocationCheck chain 198 | 199 | # Client Authentication (Type): 200 | # Client certificate verification type and depth. Types are 201 | # none, optional, require and optional_no_ca. Depth is a 202 | # number which specifies how deeply to verify the certificate 203 | # issuer chain before deciding the certificate is not valid. 204 | #SSLVerifyClient require 205 | #SSLVerifyDepth 10 206 | 207 | # TLS-SRP mutual authentication: 208 | # Enable TLS-SRP and set the path to the OpenSSL SRP verifier 209 | # file (containing login information for SRP user accounts). 210 | # Requires OpenSSL 1.0.1 or newer. See the mod_ssl FAQ for 211 | # detailed instructions on creating this file. Example: 212 | # "openssl srp -srpvfile /etc/apache2/passwd.srpv -add username" 213 | #SSLSRPVerifierFile "/etc/apache2/passwd.srpv" 214 | 215 | # Access Control: 216 | # With SSLRequire you can do per-directory access control based 217 | # on arbitrary complex boolean expressions containing server 218 | # variable checks and other lookup directives. The syntax is a 219 | # mixture between C and Perl. See the mod_ssl documentation 220 | # for more details. 221 | # 222 | #SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \ 223 | # and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \ 224 | # and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \ 225 | # and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \ 226 | # and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \ 227 | # or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/ 228 | # 229 | 230 | # SSL Engine Options: 231 | # Set various options for the SSL engine. 232 | # o FakeBasicAuth: 233 | # Translate the client X.509 into a Basic Authorisation. This means that 234 | # the standard Auth/DBMAuth methods can be used for access control. The 235 | # user name is the `one line' version of the client's X.509 certificate. 236 | # Note that no password is obtained from the user. Every entry in the user 237 | # file needs this password: `xxj31ZMTZzkVA'. 238 | # o ExportCertData: 239 | # This exports two additional environment variables: SSL_CLIENT_CERT and 240 | # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the 241 | # server (always existing) and the client (only existing when client 242 | # authentication is used). This can be used to import the certificates 243 | # into CGI scripts. 244 | # o StdEnvVars: 245 | # This exports the standard SSL/TLS related `SSL_*' environment variables. 246 | # Per default this exportation is switched off for performance reasons, 247 | # because the extraction step is an expensive operation and is usually 248 | # useless for serving static content. So one usually enables the 249 | # exportation for CGI and SSI requests only. 250 | # o StrictRequire: 251 | # This denies access when "SSLRequireSSL" or "SSLRequire" applied even 252 | # under a "Satisfy any" situation, i.e. when it applies access is denied 253 | # and no other module can change it. 254 | # o OptRenegotiate: 255 | # This enables optimized SSL connection renegotiation handling when SSL 256 | # directives are used in per-directory context. 257 | #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire 258 | 259 | SSLOptions +StdEnvVars 260 | 261 | 262 | SSLOptions +StdEnvVars 263 | 264 | 265 | # SSL Protocol Adjustments: 266 | # The safe and default but still SSL/TLS standard compliant shutdown 267 | # approach is that mod_ssl sends the close notify alert but doesn't wait for 268 | # the close notify alert from client. When you need a different shutdown 269 | # approach you can use one of the following variables: 270 | # o ssl-unclean-shutdown: 271 | # This forces an unclean shutdown when the connection is closed, i.e. no 272 | # SSL close notify alert is sent or allowed to be received. This violates 273 | # the SSL/TLS standard but is needed for some brain-dead browsers. Use 274 | # this when you receive I/O errors because of the standard approach where 275 | # mod_ssl sends the close notify alert. 276 | # o ssl-accurate-shutdown: 277 | # This forces an accurate shutdown when the connection is closed, i.e. a 278 | # SSL close notify alert is send and mod_ssl waits for the close notify 279 | # alert of the client. This is 100% SSL/TLS standard compliant, but in 280 | # practice often causes hanging connections with brain-dead browsers. Use 281 | # this only for browsers where you know that their SSL implementation 282 | # works correctly. 283 | # Notice: Most problems of broken clients are also related to the HTTP 284 | # keep-alive facility, so you usually additionally want to disable 285 | # keep-alive for those clients, too. Use variable "nokeepalive" for this. 286 | # Similarly, one has to force some clients to use HTTP/1.0 to workaround 287 | # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and 288 | # "force-response-1.0" for this. 289 | BrowserMatch "MSIE [2-5]" \ 290 | nokeepalive ssl-unclean-shutdown \ 291 | downgrade-1.0 force-response-1.0 292 | 293 | # Per-Server Logging: 294 | # The home of a custom SSL log file. Use this when you want a 295 | # compact non-error SSL logfile on a virtual host basis. 296 | LogFormat "[%{%a %b %d %H:%M:%S}t.%{usec_frac}t %{%Y}t] [ssl.conf] %h %l %u \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined 297 | 298 | CustomLog /dev/stderr combined 299 | 300 | 301 | -------------------------------------------------------------------------------- /configs/apache2/httpd.conf: -------------------------------------------------------------------------------- 1 | # 2 | # This is the main Apache HTTP server configuration file. It contains the 3 | # configuration directives that give the server its instructions. 4 | # See for detailed information. 5 | # In particular, see 6 | # 7 | # for a discussion of each configuration directive. 8 | # 9 | # Do NOT simply read the instructions in here without understanding 10 | # what they do. They're here only as hints or reminders. If you are unsure 11 | # consult the online docs. You have been warned. 12 | # 13 | # Configuration and logfile names: If the filenames you specify for many 14 | # of the server's control files begin with "/" (or "drive:/" for Win32), the 15 | # server will use that explicit path. If the filenames do *not* begin 16 | # with "/", the value of ServerRoot is prepended -- so "logs/access_log" 17 | # with ServerRoot set to "/usr/local/apache2" will be interpreted by the 18 | # server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" 19 | # will be interpreted as '/logs/access_log'. 20 | 21 | # 22 | # ServerTokens 23 | # This directive configures what you return as the Server HTTP response 24 | # Header. The default is 'Full' which sends information about the OS-Type 25 | # and compiled in modules. 26 | # Set to one of: Full | OS | Minor | Minimal | Major | Prod 27 | # where Full conveys the most information, and Prod the least. 28 | # 29 | ServerTokens OS 30 | 31 | # 32 | # ServerRoot: The top of the directory tree under which the server's 33 | # configuration, error, and log files are kept. 34 | # 35 | # Do not add a slash at the end of the directory path. If you point 36 | # ServerRoot at a non-local disk, be sure to specify a local disk on the 37 | # Mutex directive, if file-based mutexes are used. If you wish to share the 38 | # same ServerRoot for multiple httpd daemons, you will need to change at 39 | # least PidFile. 40 | # 41 | ServerRoot /var/www 42 | 43 | # 44 | # Mutex: Allows you to set the mutex mechanism and mutex file directory 45 | # for individual mutexes, or change the global defaults 46 | # 47 | # Uncomment and change the directory if mutexes are file-based and the default 48 | # mutex file directory is not on a local disk or is not appropriate for some 49 | # other reason. 50 | # 51 | # Mutex default:/run/apache2 52 | 53 | # 54 | # Listen: Allows you to bind Apache to specific IP addresses and/or 55 | # ports, instead of the default. See also the 56 | # directive. 57 | # 58 | # Change this to Listen on specific IP addresses as shown below to 59 | # prevent Apache from glomming onto all bound IP addresses. 60 | # 61 | #Listen 12.34.56.78:80 62 | Listen 80 63 | 64 | # 65 | # Dynamic Shared Object (DSO) Support 66 | # 67 | # To be able to use the functionality of a module which was built as a DSO you 68 | # have to place corresponding `LoadModule' lines at this location so the 69 | # directives contained in it are actually available _before_ they are used. 70 | # Statically compiled modules (those listed by `httpd -l') do not need 71 | # to be loaded here. 72 | # 73 | # Example: 74 | # LoadModule foo_module modules/mod_foo.so 75 | # 76 | #LoadModule mpm_event_module modules/mod_mpm_event.so 77 | LoadModule mpm_prefork_module modules/mod_mpm_prefork.so 78 | #LoadModule mpm_worker_module modules/mod_mpm_worker.so 79 | LoadModule authn_file_module modules/mod_authn_file.so 80 | #LoadModule authn_dbm_module modules/mod_authn_dbm.so 81 | #LoadModule authn_anon_module modules/mod_authn_anon.so 82 | #LoadModule authn_dbd_module modules/mod_authn_dbd.so 83 | #LoadModule authn_socache_module modules/mod_authn_socache.so 84 | LoadModule authn_core_module modules/mod_authn_core.so 85 | LoadModule authz_host_module modules/mod_authz_host.so 86 | LoadModule authz_groupfile_module modules/mod_authz_groupfile.so 87 | LoadModule authz_user_module modules/mod_authz_user.so 88 | #LoadModule authz_dbm_module modules/mod_authz_dbm.so 89 | #LoadModule authz_owner_module modules/mod_authz_owner.so 90 | #LoadModule authz_dbd_module modules/mod_authz_dbd.so 91 | LoadModule authz_core_module modules/mod_authz_core.so 92 | LoadModule access_compat_module modules/mod_access_compat.so 93 | LoadModule auth_basic_module modules/mod_auth_basic.so 94 | #LoadModule auth_form_module modules/mod_auth_form.so 95 | #LoadModule auth_digest_module modules/mod_auth_digest.so 96 | #LoadModule allowmethods_module modules/mod_allowmethods.so 97 | #LoadModule file_cache_module modules/mod_file_cache.so 98 | #LoadModule cache_module modules/mod_cache.so 99 | #LoadModule cache_disk_module modules/mod_cache_disk.so 100 | #LoadModule cache_socache_module modules/mod_cache_socache.so 101 | #LoadModule socache_shmcb_module modules/mod_socache_shmcb.so 102 | #LoadModule socache_dbm_module modules/mod_socache_dbm.so 103 | #LoadModule socache_memcache_module modules/mod_socache_memcache.so 104 | #LoadModule socache_redis_module modules/mod_socache_redis.so 105 | #LoadModule watchdog_module modules/mod_watchdog.so 106 | #LoadModule macro_module modules/mod_macro.so 107 | #LoadModule dbd_module modules/mod_dbd.so 108 | #LoadModule dumpio_module modules/mod_dumpio.so 109 | #LoadModule echo_module modules/mod_echo.so 110 | #LoadModule buffer_module modules/mod_buffer.so 111 | #LoadModule data_module modules/mod_data.so 112 | #LoadModule ratelimit_module modules/mod_ratelimit.so 113 | LoadModule reqtimeout_module modules/mod_reqtimeout.so 114 | #LoadModule ext_filter_module modules/mod_ext_filter.so 115 | #LoadModule request_module modules/mod_request.so 116 | #LoadModule include_module modules/mod_include.so 117 | LoadModule filter_module modules/mod_filter.so 118 | #LoadModule reflector_module modules/mod_reflector.so 119 | #LoadModule substitute_module modules/mod_substitute.so 120 | #LoadModule sed_module modules/mod_sed.so 121 | #LoadModule charset_lite_module modules/mod_charset_lite.so 122 | LoadModule deflate_module modules/mod_deflate.so 123 | #LoadModule brotli_module modules/mod_brotli.so 124 | LoadModule mime_module modules/mod_mime.so 125 | LoadModule log_config_module modules/mod_log_config.so 126 | #LoadModule log_debug_module modules/mod_log_debug.so 127 | #LoadModule log_forensic_module modules/mod_log_forensic.so 128 | LoadModule logio_module modules/mod_logio.so 129 | LoadModule env_module modules/mod_env.so 130 | #LoadModule mime_magic_module modules/mod_mime_magic.so 131 | LoadModule expires_module modules/mod_expires.so 132 | LoadModule headers_module modules/mod_headers.so 133 | #LoadModule usertrack_module modules/mod_usertrack.so 134 | #LoadModule unique_id_module modules/mod_unique_id.so 135 | LoadModule setenvif_module modules/mod_setenvif.so 136 | LoadModule version_module modules/mod_version.so 137 | #LoadModule remoteip_module modules/mod_remoteip.so 138 | #LoadModule session_module modules/mod_session.so 139 | #LoadModule session_cookie_module modules/mod_session_cookie.so 140 | #LoadModule session_crypto_module modules/mod_session_crypto.so 141 | #LoadModule session_dbd_module modules/mod_session_dbd.so 142 | #LoadModule slotmem_shm_module modules/mod_slotmem_shm.so 143 | #LoadModule slotmem_plain_module modules/mod_slotmem_plain.so 144 | #LoadModule dialup_module modules/mod_dialup.so 145 | #LoadModule http2_module modules/mod_http2.so 146 | LoadModule unixd_module modules/mod_unixd.so 147 | #LoadModule heartbeat_module modules/mod_heartbeat.so 148 | #LoadModule heartmonitor_module modules/mod_heartmonitor.so 149 | LoadModule status_module modules/mod_status.so 150 | LoadModule autoindex_module modules/mod_autoindex.so 151 | #LoadModule asis_module modules/mod_asis.so 152 | #LoadModule info_module modules/mod_info.so 153 | #LoadModule suexec_module modules/mod_suexec.so 154 | 155 | #LoadModule cgid_module modules/mod_cgid.so 156 | 157 | 158 | #LoadModule cgi_module modules/mod_cgi.so 159 | 160 | #LoadModule vhost_alias_module modules/mod_vhost_alias.so 161 | #LoadModule negotiation_module modules/mod_negotiation.so 162 | LoadModule dir_module modules/mod_dir.so 163 | #LoadModule actions_module modules/mod_actions.so 164 | #LoadModule speling_module modules/mod_speling.so 165 | #LoadModule userdir_module modules/mod_userdir.so 166 | LoadModule alias_module modules/mod_alias.so 167 | LoadModule rewrite_module modules/mod_rewrite.so 168 | 169 | LoadModule negotiation_module modules/mod_negotiation.so 170 | 171 | 172 | # 173 | # If you wish httpd to run as a different user or group, you must run 174 | # httpd as root initially and it will switch. 175 | # 176 | # User/Group: The name (or #number) of the user/group to run httpd as. 177 | # It is usually good practice to create a dedicated user and group for 178 | # running httpd, as with most system services. 179 | # 180 | User apache 181 | Group apache 182 | 183 | 184 | 185 | # 'Main' server configuration 186 | # 187 | # The directives in this section set up the values used by the 'main' 188 | # server, which responds to any requests that aren't handled by a 189 | # definition. These values also provide defaults for 190 | # any containers you may define later in the file. 191 | # 192 | # All of these directives may appear inside containers, 193 | # in which case these default settings will be overridden for the 194 | # virtual host being defined. 195 | # 196 | 197 | # 198 | # ServerAdmin: Your address, where problems with the server should be 199 | # e-mailed. This address appears on some server-generated pages, such 200 | # as error documents. e.g. admin@your-domain.com 201 | # 202 | PassEnv SERVER_ADMIN 203 | ServerAdmin ${SERVER_ADMIN} 204 | 205 | # 206 | # Optionally add a line containing the server version and virtual host 207 | # name to server-generated pages (internal error documents, FTP directory 208 | # listings, mod_status and mod_info output etc., but not CGI generated 209 | # documents or custom error documents). 210 | # Set to "EMail" to also include a mailto: link to the ServerAdmin. 211 | # Set to one of: On | Off | EMail 212 | # 213 | ServerSignature On 214 | 215 | # 216 | # ServerName gives the name and port that the server uses to identify itself. 217 | # This can often be determined automatically, but we recommend you specify 218 | # it explicitly to prevent problems during startup. 219 | # 220 | # If your host doesn't have a registered DNS name, enter its IP address here. 221 | # 222 | PassEnv HTTP_SERVER_NAME 223 | ServerName ${HTTP_SERVER_NAME} 224 | 225 | # 226 | # Deny access to the entirety of your server's filesystem. You must 227 | # explicitly permit access to web content directories in other 228 | # blocks below. 229 | # 230 | 231 | AllowOverride none 232 | Require all denied 233 | 234 | 235 | # 236 | # Note that from this point forward you must specifically allow 237 | # particular features to be enabled - so if something's not working as 238 | # you might expect, make sure that you have specifically enabled it 239 | # below. 240 | # 241 | 242 | # 243 | # DocumentRoot: The directory out of which you will serve your 244 | # documents. By default, all requests are taken from this directory, but 245 | # symbolic links and aliases may be used to point to other locations. 246 | # 247 | DocumentRoot "/htdocs" 248 | 249 | # 250 | # Possible values for the Options directive are "None", "All", 251 | # or any combination of: 252 | # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews 253 | # 254 | # Note that "MultiViews" must be named *explicitly* --- "Options All" 255 | # doesn't give it to you. 256 | # 257 | # The Options directive is both complicated and important. Please see 258 | # http://httpd.apache.org/docs/2.4/mod/core.html#options 259 | # for more information. 260 | # 261 | Options Indexes FollowSymLinks 262 | 263 | # 264 | # AllowOverride controls what directives may be placed in .htaccess files. 265 | # It can be "All", "None", or any combination of the keywords: 266 | # AllowOverride FileInfo AuthConfig Limit 267 | # 268 | AllowOverride All 269 | 270 | # 271 | # Controls who can get stuff from this server. 272 | # 273 | Require all granted 274 | 275 | 276 | # 277 | # DirectoryIndex: sets the file that Apache will serve if a directory 278 | # is requested. 279 | # 280 | 281 | DirectoryIndex index.html 282 | 283 | 284 | # 285 | # The following lines prevent .htaccess and .htpasswd files from being 286 | # viewed by Web clients. 287 | # 288 | 289 | Require all denied 290 | 291 | 292 | # 293 | # ErrorLog: The location of the error log file. 294 | # If you do not specify an ErrorLog directive within a 295 | # container, error messages relating to that virtual host will be 296 | # logged here. If you *do* define an error logfile for a 297 | # container, that host's errors will be logged there and not here. 298 | # 299 | ErrorLog /dev/stderr 300 | 301 | # 302 | # LogLevel: Control the number of messages logged to the error_log. 303 | # Possible values include: debug, info, notice, warn, error, crit, 304 | # alert, emerg. 305 | # 306 | PassEnv LOG_LEVEL 307 | LogLevel ${LOG_LEVEL} 308 | 309 | 310 | # 311 | # The following directives define some format nicknames for use with 312 | # a CustomLog directive (see below). 313 | # 314 | LogFormat "[%{%a %b %d %H:%M:%S}t.%{usec_frac}t %{%Y}t] [httpd.conf] %h %l %u \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined 315 | LogFormat "[%{%a %b %d %H:%M:%S}t.%{usec_frac}t %{%Y}t] [httpd.conf] %h %l %u \"%r\" %>s %b" common 316 | 317 | 318 | # You need to enable mod_logio.c to use %I and %O 319 | LogFormat "[%{%a %b %d %H:%M:%S}t.%{usec_frac}t %{%Y}t] [httpd.conf] %h %l %u \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio 320 | 321 | 322 | # 323 | # The location and format of the access logfile (Common Logfile Format). 324 | # If you do not define any access logfiles within a 325 | # container, they will be logged here. Contrariwise, if you *do* 326 | # define per- access logfiles, transactions will be 327 | # logged therein and *not* in this file. 328 | # 329 | #CustomLog logs/access.log common 330 | 331 | # 332 | # If you prefer a logfile with access, agent, and referer information 333 | # (Combined Logfile Format) you can use the following directive. 334 | # 335 | BrowserMatchNoCase ^healthcheck nolog 336 | 337 | CustomLog /dev/stdout combinedio env=!nolog 338 | 339 | 340 | 341 | 342 | # 343 | # Redirect: Allows you to tell clients about documents that used to 344 | # exist in your server's namespace, but do not anymore. The client 345 | # will make a new request for the document at its new location. 346 | # Example: 347 | # Redirect permanent /foo http://www.example.com/bar 348 | 349 | # 350 | # Alias: Maps web paths into filesystem paths and is used to 351 | # access content that does not live under the DocumentRoot. 352 | # Example: 353 | # Alias /webpath /full/filesystem/path 354 | # 355 | # If you include a trailing / on /webpath then the server will 356 | # require it to be present in the URL. You will also likely 357 | # need to provide a section to allow access to 358 | # the filesystem path. 359 | 360 | # 361 | # ScriptAlias: This controls which directories contain server scripts. 362 | # ScriptAliases are essentially the same as Aliases, except that 363 | # documents in the target directory are treated as applications and 364 | # run by the server when requested rather than as documents sent to the 365 | # client. The same rules about trailing "/" apply to ScriptAlias 366 | # directives as to Alias. 367 | # 368 | ScriptAlias /cgi-bin/ "/var/www/localhost/cgi-bin/" 369 | 370 | 371 | 372 | 373 | # 374 | # ScriptSock: On threaded servers, designate the path to the UNIX 375 | # socket used to communicate with the CGI daemon of mod_cgid. 376 | # 377 | #Scriptsock cgisock 378 | 379 | 380 | # 381 | # "/var/www/localhost/cgi-bin" should be changed to whatever your ScriptAliased 382 | # CGI directory exists, if you have that configured. 383 | # 384 | 385 | AllowOverride All 386 | Options None 387 | Require all granted 388 | 389 | 390 | 391 | # 392 | # Avoid passing HTTP_PROXY environment to CGI's on this or any proxied 393 | # backend servers which have lingering "httpoxy" defects. 394 | # 'Proxy' request header is undefined by the IETF, not listed by IANA 395 | # 396 | RequestHeader unset Proxy early 397 | 398 | 399 | 400 | # 401 | # TypesConfig points to the file containing the list of mappings from 402 | # filename extension to MIME-type. 403 | # 404 | TypesConfig /etc/apache2/mime.types 405 | 406 | # 407 | # AddType allows you to add to or override the MIME configuration 408 | # file specified in TypesConfig for specific file types. 409 | # 410 | #AddType application/x-gzip .tgz 411 | # 412 | # AddEncoding allows you to have certain browsers uncompress 413 | # information on the fly. Note: Not all browsers support this. 414 | # 415 | #AddEncoding x-compress .Z 416 | #AddEncoding x-gzip .gz .tgz 417 | # 418 | # If the AddEncoding directives above are commented-out, then you 419 | # probably should define those extensions to indicate media types: 420 | # 421 | AddType application/x-compress .Z 422 | AddType application/x-gzip .gz .tgz 423 | 424 | # 425 | # AddHandler allows you to map certain file extensions to "handlers": 426 | # actions unrelated to filetype. These can be either built into the server 427 | # or added with the Action directive (see below) 428 | # 429 | # To use CGI scripts outside of ScriptAliased directories: 430 | # (You will also need to add "ExecCGI" to the "Options" directive.) 431 | # 432 | #AddHandler cgi-script .cgi 433 | 434 | # For type maps (negotiated resources): 435 | #AddHandler type-map var 436 | 437 | # 438 | # Filters allow you to process content before it is sent to the client. 439 | # 440 | # To parse .shtml files for server-side includes (SSI): 441 | # (You will also need to add "Includes" to the "Options" directive.) 442 | # 443 | #AddType text/html .shtml 444 | #AddOutputFilter INCLUDES .shtml 445 | 446 | 447 | # 448 | # The mod_mime_magic module allows the server to use various hints from the 449 | # contents of the file itself to determine its type. The MIMEMagicFile 450 | # directive tells the module where the hint definitions are located. 451 | # 452 | 453 | MIMEMagicFile /etc/apache2/magic 454 | 455 | 456 | # 457 | # Customizable error responses come in three flavors: 458 | # 1) plain text 2) local redirects 3) external redirects 459 | # 460 | # Some examples: 461 | #ErrorDocument 500 "The server made a boo boo." 462 | #ErrorDocument 404 /missing.html 463 | #ErrorDocument 404 "/cgi-bin/missing_handler.pl" 464 | #ErrorDocument 402 http://www.example.com/subscription_info.html 465 | # 466 | 467 | # 468 | # MaxRanges: Maximum number of Ranges in a request before 469 | # returning the entire resource, or one of the special 470 | # values 'default', 'none' or 'unlimited'. 471 | # Default setting is to accept 200 Ranges. 472 | #MaxRanges unlimited 473 | 474 | # 475 | # EnableMMAP and EnableSendfile: On systems that support it, 476 | # memory-mapping or the sendfile syscall may be used to deliver 477 | # files. This usually improves server performance, but must 478 | # be turned off when serving from networked-mounted 479 | # filesystems or if support for these functions is otherwise 480 | # broken on your system. 481 | # Defaults: EnableMMAP On, EnableSendfile Off 482 | # 483 | #EnableMMAP off 484 | #EnableSendfile on 485 | 486 | # Load config files from the config directory "/etc/apache2/conf.d". 487 | # 488 | IncludeOptional /etc/apache2/conf.d/*.conf 489 | AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/json 490 | 491 | # 492 | # The PidFile directive sets the file to which the server records the 493 | # process id of the daemon. If the filename is not absolute, then it 494 | # is assumed to be relative to the ServerRoot. 495 | PidFile /htdocs/httpd.pid 496 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU AFFERO GENERAL PUBLIC LICENSE 2 | Version 3, 19 November 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU Affero General Public License is a free, copyleft license for 11 | software and other kinds of works, specifically designed to ensure 12 | cooperation with the community in the case of network server software. 13 | 14 | The licenses for most software and other practical works are designed 15 | to take away your freedom to share and change the works. By contrast, 16 | our General Public Licenses are intended to guarantee your freedom to 17 | share and change all versions of a program--to make sure it remains free 18 | software for all its users. 19 | 20 | When we speak of free software, we are referring to freedom, not 21 | price. Our General Public Licenses are designed to make sure that you 22 | have the freedom to distribute copies of free software (and charge for 23 | them if you wish), that you receive source code or can get it if you 24 | want it, that you can change the software or use pieces of it in new 25 | free programs, and that you know you can do these things. 26 | 27 | Developers that use our General Public Licenses protect your rights 28 | with two steps: (1) assert copyright on the software, and (2) offer 29 | you this License which gives you legal permission to copy, distribute 30 | and/or modify the software. 31 | 32 | A secondary benefit of defending all users' freedom is that 33 | improvements made in alternate versions of the program, if they 34 | receive widespread use, become available for other developers to 35 | incorporate. Many developers of free software are heartened and 36 | encouraged by the resulting cooperation. However, in the case of 37 | software used on network servers, this result may fail to come about. 38 | The GNU General Public License permits making a modified version and 39 | letting the public access it on a server without ever releasing its 40 | source code to the public. 41 | 42 | The GNU Affero General Public License is designed specifically to 43 | ensure that, in such cases, the modified source code becomes available 44 | to the community. It requires the operator of a network server to 45 | provide the source code of the modified version running there to the 46 | users of that server. Therefore, public use of a modified version, on 47 | a publicly accessible server, gives the public access to the source 48 | code of the modified version. 49 | 50 | An older license, called the Affero General Public License and 51 | published by Affero, was designed to accomplish similar goals. This is 52 | a different license, not a version of the Affero GPL, but Affero has 53 | released a new version of the Affero GPL which permits relicensing under 54 | this license. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | TERMS AND CONDITIONS 60 | 61 | 0. Definitions. 62 | 63 | "This License" refers to version 3 of the GNU Affero General Public License. 64 | 65 | "Copyright" also means copyright-like laws that apply to other kinds of 66 | works, such as semiconductor masks. 67 | 68 | "The Program" refers to any copyrightable work licensed under this 69 | License. Each licensee is addressed as "you". "Licensees" and 70 | "recipients" may be individuals or organizations. 71 | 72 | To "modify" a work means to copy from or adapt all or part of the work 73 | in a fashion requiring copyright permission, other than the making of an 74 | exact copy. The resulting work is called a "modified version" of the 75 | earlier work or a work "based on" the earlier work. 76 | 77 | A "covered work" means either the unmodified Program or a work based 78 | on the Program. 79 | 80 | To "propagate" a work means to do anything with it that, without 81 | permission, would make you directly or secondarily liable for 82 | infringement under applicable copyright law, except executing it on a 83 | computer or modifying a private copy. Propagation includes copying, 84 | distribution (with or without modification), making available to the 85 | public, and in some countries other activities as well. 86 | 87 | To "convey" a work means any kind of propagation that enables other 88 | parties to make or receive copies. Mere interaction with a user through 89 | a computer network, with no transfer of a copy, is not conveying. 90 | 91 | An interactive user interface displays "Appropriate Legal Notices" 92 | to the extent that it includes a convenient and prominently visible 93 | feature that (1) displays an appropriate copyright notice, and (2) 94 | tells the user that there is no warranty for the work (except to the 95 | extent that warranties are provided), that licensees may convey the 96 | work under this License, and how to view a copy of this License. If 97 | the interface presents a list of user commands or options, such as a 98 | menu, a prominent item in the list meets this criterion. 99 | 100 | 1. Source Code. 101 | 102 | The "source code" for a work means the preferred form of the work 103 | for making modifications to it. "Object code" means any non-source 104 | form of a work. 105 | 106 | A "Standard Interface" means an interface that either is an official 107 | standard defined by a recognized standards body, or, in the case of 108 | interfaces specified for a particular programming language, one that 109 | is widely used among developers working in that language. 110 | 111 | The "System Libraries" of an executable work include anything, other 112 | than the work as a whole, that (a) is included in the normal form of 113 | packaging a Major Component, but which is not part of that Major 114 | Component, and (b) serves only to enable use of the work with that 115 | Major Component, or to implement a Standard Interface for which an 116 | implementation is available to the public in source code form. A 117 | "Major Component", in this context, means a major essential component 118 | (kernel, window system, and so on) of the specific operating system 119 | (if any) on which the executable work runs, or a compiler used to 120 | produce the work, or an object code interpreter used to run it. 121 | 122 | The "Corresponding Source" for a work in object code form means all 123 | the source code needed to generate, install, and (for an executable 124 | work) run the object code and to modify the work, including scripts to 125 | control those activities. However, it does not include the work's 126 | System Libraries, or general-purpose tools or generally available free 127 | programs which are used unmodified in performing those activities but 128 | which are not part of the work. For example, Corresponding Source 129 | includes interface definition files associated with source files for 130 | the work, and the source code for shared libraries and dynamically 131 | linked subprograms that the work is specifically designed to require, 132 | such as by intimate data communication or control flow between those 133 | subprograms and other parts of the work. 134 | 135 | The Corresponding Source need not include anything that users 136 | can regenerate automatically from other parts of the Corresponding 137 | Source. 138 | 139 | The Corresponding Source for a work in source code form is that 140 | same work. 141 | 142 | 2. Basic Permissions. 143 | 144 | All rights granted under this License are granted for the term of 145 | copyright on the Program, and are irrevocable provided the stated 146 | conditions are met. This License explicitly affirms your unlimited 147 | permission to run the unmodified Program. The output from running a 148 | covered work is covered by this License only if the output, given its 149 | content, constitutes a covered work. This License acknowledges your 150 | rights of fair use or other equivalent, as provided by copyright law. 151 | 152 | You may make, run and propagate covered works that you do not 153 | convey, without conditions so long as your license otherwise remains 154 | in force. You may convey covered works to others for the sole purpose 155 | of having them make modifications exclusively for you, or provide you 156 | with facilities for running those works, provided that you comply with 157 | the terms of this License in conveying all material for which you do 158 | not control copyright. Those thus making or running the covered works 159 | for you must do so exclusively on your behalf, under your direction 160 | and control, on terms that prohibit them from making any copies of 161 | your copyrighted material outside their relationship with you. 162 | 163 | Conveying under any other circumstances is permitted solely under 164 | the conditions stated below. Sublicensing is not allowed; section 10 165 | makes it unnecessary. 166 | 167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 168 | 169 | No covered work shall be deemed part of an effective technological 170 | measure under any applicable law fulfilling obligations under article 171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 172 | similar laws prohibiting or restricting circumvention of such 173 | measures. 174 | 175 | When you convey a covered work, you waive any legal power to forbid 176 | circumvention of technological measures to the extent such circumvention 177 | is effected by exercising rights under this License with respect to 178 | the covered work, and you disclaim any intention to limit operation or 179 | modification of the work as a means of enforcing, against the work's 180 | users, your or third parties' legal rights to forbid circumvention of 181 | technological measures. 182 | 183 | 4. Conveying Verbatim Copies. 184 | 185 | You may convey verbatim copies of the Program's source code as you 186 | receive it, in any medium, provided that you conspicuously and 187 | appropriately publish on each copy an appropriate copyright notice; 188 | keep intact all notices stating that this License and any 189 | non-permissive terms added in accord with section 7 apply to the code; 190 | keep intact all notices of the absence of any warranty; and give all 191 | recipients a copy of this License along with the Program. 192 | 193 | You may charge any price or no price for each copy that you convey, 194 | and you may offer support or warranty protection for a fee. 195 | 196 | 5. Conveying Modified Source Versions. 197 | 198 | You may convey a work based on the Program, or the modifications to 199 | produce it from the Program, in the form of source code under the 200 | terms of section 4, provided that you also meet all of these conditions: 201 | 202 | a) The work must carry prominent notices stating that you modified 203 | it, and giving a relevant date. 204 | 205 | b) The work must carry prominent notices stating that it is 206 | released under this License and any conditions added under section 207 | 7. This requirement modifies the requirement in section 4 to 208 | "keep intact all notices". 209 | 210 | c) You must license the entire work, as a whole, under this 211 | License to anyone who comes into possession of a copy. This 212 | License will therefore apply, along with any applicable section 7 213 | additional terms, to the whole of the work, and all its parts, 214 | regardless of how they are packaged. This License gives no 215 | permission to license the work in any other way, but it does not 216 | invalidate such permission if you have separately received it. 217 | 218 | d) If the work has interactive user interfaces, each must display 219 | Appropriate Legal Notices; however, if the Program has interactive 220 | interfaces that do not display Appropriate Legal Notices, your 221 | work need not make them do so. 222 | 223 | A compilation of a covered work with other separate and independent 224 | works, which are not by their nature extensions of the covered work, 225 | and which are not combined with it such as to form a larger program, 226 | in or on a volume of a storage or distribution medium, is called an 227 | "aggregate" if the compilation and its resulting copyright are not 228 | used to limit the access or legal rights of the compilation's users 229 | beyond what the individual works permit. Inclusion of a covered work 230 | in an aggregate does not cause this License to apply to the other 231 | parts of the aggregate. 232 | 233 | 6. Conveying Non-Source Forms. 234 | 235 | You may convey a covered work in object code form under the terms 236 | of sections 4 and 5, provided that you also convey the 237 | machine-readable Corresponding Source under the terms of this License, 238 | in one of these ways: 239 | 240 | a) Convey the object code in, or embodied in, a physical product 241 | (including a physical distribution medium), accompanied by the 242 | Corresponding Source fixed on a durable physical medium 243 | customarily used for software interchange. 244 | 245 | b) Convey the object code in, or embodied in, a physical product 246 | (including a physical distribution medium), accompanied by a 247 | written offer, valid for at least three years and valid for as 248 | long as you offer spare parts or customer support for that product 249 | model, to give anyone who possesses the object code either (1) a 250 | copy of the Corresponding Source for all the software in the 251 | product that is covered by this License, on a durable physical 252 | medium customarily used for software interchange, for a price no 253 | more than your reasonable cost of physically performing this 254 | conveying of source, or (2) access to copy the 255 | Corresponding Source from a network server at no charge. 256 | 257 | c) Convey individual copies of the object code with a copy of the 258 | written offer to provide the Corresponding Source. This 259 | alternative is allowed only occasionally and noncommercially, and 260 | only if you received the object code with such an offer, in accord 261 | with subsection 6b. 262 | 263 | d) Convey the object code by offering access from a designated 264 | place (gratis or for a charge), and offer equivalent access to the 265 | Corresponding Source in the same way through the same place at no 266 | further charge. You need not require recipients to copy the 267 | Corresponding Source along with the object code. If the place to 268 | copy the object code is a network server, the Corresponding Source 269 | may be on a different server (operated by you or a third party) 270 | that supports equivalent copying facilities, provided you maintain 271 | clear directions next to the object code saying where to find the 272 | Corresponding Source. Regardless of what server hosts the 273 | Corresponding Source, you remain obligated to ensure that it is 274 | available for as long as needed to satisfy these requirements. 275 | 276 | e) Convey the object code using peer-to-peer transmission, provided 277 | you inform other peers where the object code and Corresponding 278 | Source of the work are being offered to the general public at no 279 | charge under subsection 6d. 280 | 281 | A separable portion of the object code, whose source code is excluded 282 | from the Corresponding Source as a System Library, need not be 283 | included in conveying the object code work. 284 | 285 | A "User Product" is either (1) a "consumer product", which means any 286 | tangible personal property which is normally used for personal, family, 287 | or household purposes, or (2) anything designed or sold for incorporation 288 | into a dwelling. In determining whether a product is a consumer product, 289 | doubtful cases shall be resolved in favor of coverage. For a particular 290 | product received by a particular user, "normally used" refers to a 291 | typical or common use of that class of product, regardless of the status 292 | of the particular user or of the way in which the particular user 293 | actually uses, or expects or is expected to use, the product. A product 294 | is a consumer product regardless of whether the product has substantial 295 | commercial, industrial or non-consumer uses, unless such uses represent 296 | the only significant mode of use of the product. 297 | 298 | "Installation Information" for a User Product means any methods, 299 | procedures, authorization keys, or other information required to install 300 | and execute modified versions of a covered work in that User Product from 301 | a modified version of its Corresponding Source. The information must 302 | suffice to ensure that the continued functioning of the modified object 303 | code is in no case prevented or interfered with solely because 304 | modification has been made. 305 | 306 | If you convey an object code work under this section in, or with, or 307 | specifically for use in, a User Product, and the conveying occurs as 308 | part of a transaction in which the right of possession and use of the 309 | User Product is transferred to the recipient in perpetuity or for a 310 | fixed term (regardless of how the transaction is characterized), the 311 | Corresponding Source conveyed under this section must be accompanied 312 | by the Installation Information. But this requirement does not apply 313 | if neither you nor any third party retains the ability to install 314 | modified object code on the User Product (for example, the work has 315 | been installed in ROM). 316 | 317 | The requirement to provide Installation Information does not include a 318 | requirement to continue to provide support service, warranty, or updates 319 | for a work that has been modified or installed by the recipient, or for 320 | the User Product in which it has been modified or installed. Access to a 321 | network may be denied when the modification itself materially and 322 | adversely affects the operation of the network or violates the rules and 323 | protocols for communication across the network. 324 | 325 | Corresponding Source conveyed, and Installation Information provided, 326 | in accord with this section must be in a format that is publicly 327 | documented (and with an implementation available to the public in 328 | source code form), and must require no special password or key for 329 | unpacking, reading or copying. 330 | 331 | 7. Additional Terms. 332 | 333 | "Additional permissions" are terms that supplement the terms of this 334 | License by making exceptions from one or more of its conditions. 335 | Additional permissions that are applicable to the entire Program shall 336 | be treated as though they were included in this License, to the extent 337 | that they are valid under applicable law. If additional permissions 338 | apply only to part of the Program, that part may be used separately 339 | under those permissions, but the entire Program remains governed by 340 | this License without regard to the additional permissions. 341 | 342 | When you convey a copy of a covered work, you may at your option 343 | remove any additional permissions from that copy, or from any part of 344 | it. (Additional permissions may be written to require their own 345 | removal in certain cases when you modify the work.) You may place 346 | additional permissions on material, added by you to a covered work, 347 | for which you have or can give appropriate copyright permission. 348 | 349 | Notwithstanding any other provision of this License, for material you 350 | add to a covered work, you may (if authorized by the copyright holders of 351 | that material) supplement the terms of this License with terms: 352 | 353 | a) Disclaiming warranty or limiting liability differently from the 354 | terms of sections 15 and 16 of this License; or 355 | 356 | b) Requiring preservation of specified reasonable legal notices or 357 | author attributions in that material or in the Appropriate Legal 358 | Notices displayed by works containing it; or 359 | 360 | c) Prohibiting misrepresentation of the origin of that material, or 361 | requiring that modified versions of such material be marked in 362 | reasonable ways as different from the original version; or 363 | 364 | d) Limiting the use for publicity purposes of names of licensors or 365 | authors of the material; or 366 | 367 | e) Declining to grant rights under trademark law for use of some 368 | trade names, trademarks, or service marks; or 369 | 370 | f) Requiring indemnification of licensors and authors of that 371 | material by anyone who conveys the material (or modified versions of 372 | it) with contractual assumptions of liability to the recipient, for 373 | any liability that these contractual assumptions directly impose on 374 | those licensors and authors. 375 | 376 | All other non-permissive additional terms are considered "further 377 | restrictions" within the meaning of section 10. If the Program as you 378 | received it, or any part of it, contains a notice stating that it is 379 | governed by this License along with a term that is a further 380 | restriction, you may remove that term. If a license document contains 381 | a further restriction but permits relicensing or conveying under this 382 | License, you may add to a covered work material governed by the terms 383 | of that license document, provided that the further restriction does 384 | not survive such relicensing or conveying. 385 | 386 | If you add terms to a covered work in accord with this section, you 387 | must place, in the relevant source files, a statement of the 388 | additional terms that apply to those files, or a notice indicating 389 | where to find the applicable terms. 390 | 391 | Additional terms, permissive or non-permissive, may be stated in the 392 | form of a separately written license, or stated as exceptions; 393 | the above requirements apply either way. 394 | 395 | 8. Termination. 396 | 397 | You may not propagate or modify a covered work except as expressly 398 | provided under this License. Any attempt otherwise to propagate or 399 | modify it is void, and will automatically terminate your rights under 400 | this License (including any patent licenses granted under the third 401 | paragraph of section 11). 402 | 403 | However, if you cease all violation of this License, then your 404 | license from a particular copyright holder is reinstated (a) 405 | provisionally, unless and until the copyright holder explicitly and 406 | finally terminates your license, and (b) permanently, if the copyright 407 | holder fails to notify you of the violation by some reasonable means 408 | prior to 60 days after the cessation. 409 | 410 | Moreover, your license from a particular copyright holder is 411 | reinstated permanently if the copyright holder notifies you of the 412 | violation by some reasonable means, this is the first time you have 413 | received notice of violation of this License (for any work) from that 414 | copyright holder, and you cure the violation prior to 30 days after 415 | your receipt of the notice. 416 | 417 | Termination of your rights under this section does not terminate the 418 | licenses of parties who have received copies or rights from you under 419 | this License. If your rights have been terminated and not permanently 420 | reinstated, you do not qualify to receive new licenses for the same 421 | material under section 10. 422 | 423 | 9. Acceptance Not Required for Having Copies. 424 | 425 | You are not required to accept this License in order to receive or 426 | run a copy of the Program. Ancillary propagation of a covered work 427 | occurring solely as a consequence of using peer-to-peer transmission 428 | to receive a copy likewise does not require acceptance. However, 429 | nothing other than this License grants you permission to propagate or 430 | modify any covered work. These actions infringe copyright if you do 431 | not accept this License. Therefore, by modifying or propagating a 432 | covered work, you indicate your acceptance of this License to do so. 433 | 434 | 10. Automatic Licensing of Downstream Recipients. 435 | 436 | Each time you convey a covered work, the recipient automatically 437 | receives a license from the original licensors, to run, modify and 438 | propagate that work, subject to this License. You are not responsible 439 | for enforcing compliance by third parties with this License. 440 | 441 | An "entity transaction" is a transaction transferring control of an 442 | organization, or substantially all assets of one, or subdividing an 443 | organization, or merging organizations. If propagation of a covered 444 | work results from an entity transaction, each party to that 445 | transaction who receives a copy of the work also receives whatever 446 | licenses to the work the party's predecessor in interest had or could 447 | give under the previous paragraph, plus a right to possession of the 448 | Corresponding Source of the work from the predecessor in interest, if 449 | the predecessor has it or can get it with reasonable efforts. 450 | 451 | You may not impose any further restrictions on the exercise of the 452 | rights granted or affirmed under this License. For example, you may 453 | not impose a license fee, royalty, or other charge for exercise of 454 | rights granted under this License, and you may not initiate litigation 455 | (including a cross-claim or counterclaim in a lawsuit) alleging that 456 | any patent claim is infringed by making, using, selling, offering for 457 | sale, or importing the Program or any portion of it. 458 | 459 | 11. Patents. 460 | 461 | A "contributor" is a copyright holder who authorizes use under this 462 | License of the Program or a work on which the Program is based. The 463 | work thus licensed is called the contributor's "contributor version". 464 | 465 | A contributor's "essential patent claims" are all patent claims 466 | owned or controlled by the contributor, whether already acquired or 467 | hereafter acquired, that would be infringed by some manner, permitted 468 | by this License, of making, using, or selling its contributor version, 469 | but do not include claims that would be infringed only as a 470 | consequence of further modification of the contributor version. For 471 | purposes of this definition, "control" includes the right to grant 472 | patent sublicenses in a manner consistent with the requirements of 473 | this License. 474 | 475 | Each contributor grants you a non-exclusive, worldwide, royalty-free 476 | patent license under the contributor's essential patent claims, to 477 | make, use, sell, offer for sale, import and otherwise run, modify and 478 | propagate the contents of its contributor version. 479 | 480 | In the following three paragraphs, a "patent license" is any express 481 | agreement or commitment, however denominated, not to enforce a patent 482 | (such as an express permission to practice a patent or covenant not to 483 | sue for patent infringement). To "grant" such a patent license to a 484 | party means to make such an agreement or commitment not to enforce a 485 | patent against the party. 486 | 487 | If you convey a covered work, knowingly relying on a patent license, 488 | and the Corresponding Source of the work is not available for anyone 489 | to copy, free of charge and under the terms of this License, through a 490 | publicly available network server or other readily accessible means, 491 | then you must either (1) cause the Corresponding Source to be so 492 | available, or (2) arrange to deprive yourself of the benefit of the 493 | patent license for this particular work, or (3) arrange, in a manner 494 | consistent with the requirements of this License, to extend the patent 495 | license to downstream recipients. "Knowingly relying" means you have 496 | actual knowledge that, but for the patent license, your conveying the 497 | covered work in a country, or your recipient's use of the covered work 498 | in a country, would infringe one or more identifiable patents in that 499 | country that you have reason to believe are valid. 500 | 501 | If, pursuant to or in connection with a single transaction or 502 | arrangement, you convey, or propagate by procuring conveyance of, a 503 | covered work, and grant a patent license to some of the parties 504 | receiving the covered work authorizing them to use, propagate, modify 505 | or convey a specific copy of the covered work, then the patent license 506 | you grant is automatically extended to all recipients of the covered 507 | work and works based on it. 508 | 509 | A patent license is "discriminatory" if it does not include within 510 | the scope of its coverage, prohibits the exercise of, or is 511 | conditioned on the non-exercise of one or more of the rights that are 512 | specifically granted under this License. You may not convey a covered 513 | work if you are a party to an arrangement with a third party that is 514 | in the business of distributing software, under which you make payment 515 | to the third party based on the extent of your activity of conveying 516 | the work, and under which the third party grants, to any of the 517 | parties who would receive the covered work from you, a discriminatory 518 | patent license (a) in connection with copies of the covered work 519 | conveyed by you (or copies made from those copies), or (b) primarily 520 | for and in connection with specific products or compilations that 521 | contain the covered work, unless you entered into that arrangement, 522 | or that patent license was granted, prior to 28 March 2007. 523 | 524 | Nothing in this License shall be construed as excluding or limiting 525 | any implied license or other defenses to infringement that may 526 | otherwise be available to you under applicable patent law. 527 | 528 | 12. No Surrender of Others' Freedom. 529 | 530 | If conditions are imposed on you (whether by court order, agreement or 531 | otherwise) that contradict the conditions of this License, they do not 532 | excuse you from the conditions of this License. If you cannot convey a 533 | covered work so as to satisfy simultaneously your obligations under this 534 | License and any other pertinent obligations, then as a consequence you may 535 | not convey it at all. For example, if you agree to terms that obligate you 536 | to collect a royalty for further conveying from those to whom you convey 537 | the Program, the only way you could satisfy both those terms and this 538 | License would be to refrain entirely from conveying the Program. 539 | 540 | 13. Remote Network Interaction; Use with the GNU General Public License. 541 | 542 | Notwithstanding any other provision of this License, if you modify the 543 | Program, your modified version must prominently offer all users 544 | interacting with it remotely through a computer network (if your version 545 | supports such interaction) an opportunity to receive the Corresponding 546 | Source of your version by providing access to the Corresponding Source 547 | from a network server at no charge, through some standard or customary 548 | means of facilitating copying of software. This Corresponding Source 549 | shall include the Corresponding Source for any work covered by version 3 550 | of the GNU General Public License that is incorporated pursuant to the 551 | following paragraph. 552 | 553 | Notwithstanding any other provision of this License, you have 554 | permission to link or combine any covered work with a work licensed 555 | under version 3 of the GNU General Public License into a single 556 | combined work, and to convey the resulting work. The terms of this 557 | License will continue to apply to the part which is the covered work, 558 | but the work with which it is combined will remain governed by version 559 | 3 of the GNU General Public License. 560 | 561 | 14. Revised Versions of this License. 562 | 563 | The Free Software Foundation may publish revised and/or new versions of 564 | the GNU Affero General Public License from time to time. Such new versions 565 | will be similar in spirit to the present version, but may differ in detail to 566 | address new problems or concerns. 567 | 568 | Each version is given a distinguishing version number. If the 569 | Program specifies that a certain numbered version of the GNU Affero General 570 | Public License "or any later version" applies to it, you have the 571 | option of following the terms and conditions either of that numbered 572 | version or of any later version published by the Free Software 573 | Foundation. If the Program does not specify a version number of the 574 | GNU Affero General Public License, you may choose any version ever published 575 | by the Free Software Foundation. 576 | 577 | If the Program specifies that a proxy can decide which future 578 | versions of the GNU Affero General Public License can be used, that proxy's 579 | public statement of acceptance of a version permanently authorizes you 580 | to choose that version for the Program. 581 | 582 | Later license versions may give you additional or different 583 | permissions. However, no additional obligations are imposed on any 584 | author or copyright holder as a result of your choosing to follow a 585 | later version. 586 | 587 | 15. Disclaimer of Warranty. 588 | 589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 597 | 598 | 16. Limitation of Liability. 599 | 600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 608 | SUCH DAMAGES. 609 | 610 | 17. Interpretation of Sections 15 and 16. 611 | 612 | If the disclaimer of warranty and limitation of liability provided 613 | above cannot be given local legal effect according to their terms, 614 | reviewing courts shall apply local law that most closely approximates 615 | an absolute waiver of all civil liability in connection with the 616 | Program, unless a warranty or assumption of liability accompanies a 617 | copy of the Program in return for a fee. 618 | 619 | END OF TERMS AND CONDITIONS 620 | 621 | How to Apply These Terms to Your New Programs 622 | 623 | If you develop a new program, and you want it to be of the greatest 624 | possible use to the public, the best way to achieve this is to make it 625 | free software which everyone can redistribute and change under these terms. 626 | 627 | To do so, attach the following notices to the program. It is safest 628 | to attach them to the start of each source file to most effectively 629 | state the exclusion of warranty; and each file should have at least 630 | the "copyright" line and a pointer to where the full notice is found. 631 | 632 | 633 | Copyright (C) 634 | 635 | This program is free software: you can redistribute it and/or modify 636 | it under the terms of the GNU Affero General Public License as published 637 | by the Free Software Foundation, either version 3 of the License, or 638 | (at your option) any later version. 639 | 640 | This program is distributed in the hope that it will be useful, 641 | but WITHOUT ANY WARRANTY; without even the implied warranty of 642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 643 | GNU Affero General Public License for more details. 644 | 645 | You should have received a copy of the GNU Affero General Public License 646 | along with this program. If not, see . 647 | 648 | Also add information on how to contact you by electronic and paper mail. 649 | 650 | If your software can interact with users remotely through a computer 651 | network, you should also make sure that it provides a way for users to 652 | get its source. For example, if your program is a web application, its 653 | interface could display a "Source" link that leads users to an archive 654 | of the code. There are many ways you could offer source, and different 655 | solutions will be better for different programs; see section 13 for the 656 | specific requirements. 657 | 658 | You should also get your employer (if you work as a programmer) or school, 659 | if any, to sign a "copyright disclaimer" for the program, if necessary. 660 | For more information on this, and how to apply and follow the GNU AGPL, see 661 | . 662 | --------------------------------------------------------------------------------