commit 93fee36b19c916dc3a4a744b6c73f92112b2fe00 Author: Markus Birth Date: Mon Apr 13 21:02:53 2015 +0200 Initial import diff --git a/.ungitrc b/.ungitrc new file mode 100644 index 0000000..30edd6b --- /dev/null +++ b/.ungitrc @@ -0,0 +1,4 @@ +{ + launchBrowser: false, + forcedLaunchPath: /var/www/html/ocde +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..2ae4eb3 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +Vagrantfile for Opencaching DE +============================== + +1. Install [Vagrant](https://www.vagrantup.com/) +1. Install [VirtualBox](https://www.virtualbox.org/) +1. Checkout this repository to some folder. +1. Run `vagrant up` from that folder. + +After the machine is fully running, these ports will be open: + +* [8080](http://localhost:8080) --- Opencaching DE Test installation +* [8448](http://localhost:8448) --- ungit, a Git client diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..efbc2e1 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,14 @@ +# -*- mode: ruby -*- + +VAGRANTFILE_API_VERSION = "2" + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + config.vm.define "OpenCachingDE" do |ocde| + ocde.vm.box = "ubuntu/trusty32" + ocde.vm.network "forwarded_port", host: 8080, guest: 80 + ocde.vm.network "forwarded_port", host: 8448, guest: 8448 + ocde.vm.provision :shell, path: "bootstrap.sh" + end +end + +# vi: set ft=ruby : diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100644 index 0000000..408ec44 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +OC_GIT="https://github.com/OpencachingDeutschland/oc-server3.git" + +# This is an automated script, don't ask questions +export DEBIAN_FRONTEND="noninteractive" + +# Update repositories +apt-get update + +# Install debconf +#apt-get install -y -f debconf-utils + +# Pre-set password for MariaDB root user +#debconf-set-selections <<< 'mariadb-server mariadb-server/root_password password octest' +#debconf-set-selections <<< 'mariadb-server mariadb-server/root_password_again password octest' + +# Install PHP, MySQL, Apache2 (/var/www/html) +apt-get install -y -f apache2 mariadb-server mariadb-client libapache2-mod-php5filter +if ! [ -L /var/www ]; then + rm -rf /var/www + ln -fs /vagrant /var/www +fi + +# Copy and activate OCDE Apache configuration +cp /vagrant/opencaching.conf /etc/apache2/sites-available/ +a2ensite opencaching +service apache2 reload + +# Install git +apt-get install -y -f git + +# Install ungit +apt-get install -y -f npm nodejs-legacy +npm install -g ungit + +cp /vagrant/.ungitrc /home/vagrant/ + +sudo -u vagrant nohup ungit >/tmp/ungit.log 2>&1 & + +# Checkout OCDE code +sudo -u vagrant git clone $OC_GIT /var/www/html/ocde diff --git a/html/index.html b/html/index.html new file mode 100644 index 0000000..f0c91c7 --- /dev/null +++ b/html/index.html @@ -0,0 +1,378 @@ + + + + + + + Apache2 Ubuntu Default Page: It works + + + +
+ + +
+ + +
+
+ It works! +
+
+

+ This is the default welcome page used to test the correct + operation of the Apache2 server after installation on Ubuntu systems. + It is based on the equivalent page on Debian, from which the Ubuntu Apache + packaging is derived. + If you can read this page, it means that the Apache HTTP server installed at + this site is working properly. You should replace this file (located at + /var/www/html/index.html) before continuing to operate your HTTP server. +

+ + +

+ If you are a normal user of this web site and don't know what this page is + about, this probably means that the site is currently unavailable due to + maintenance. + If the problem persists, please contact the site's administrator. +

+ +
+
+
+ Configuration Overview +
+
+

+ Ubuntu's Apache2 default configuration is different from the + upstream default configuration, and split into several files optimized for + interaction with Ubuntu tools. The configuration system is + fully documented in + /usr/share/doc/apache2/README.Debian.gz. Refer to this for the full + documentation. Documentation for the web server itself can be + found by accessing the manual if the apache2-doc + package was installed on this server. + +

+

+ The configuration layout for an Apache2 web server installation on Ubuntu systems is as follows: +

+
+/etc/apache2/
+|-- apache2.conf
+|       `--  ports.conf
+|-- mods-enabled
+|       |-- *.load
+|       `-- *.conf
+|-- conf-enabled
+|       `-- *.conf
+|-- sites-enabled
+|       `-- *.conf
+          
+
    +
  • + apache2.conf is the main configuration + file. It puts the pieces together by including all remaining configuration + files when starting up the web server. +
  • + +
  • + ports.conf is always included from the + main configuration file. It is used to determine the listening ports for + incoming connections, and this file can be customized anytime. +
  • + +
  • + Configuration files in the mods-enabled/, + conf-enabled/ and sites-enabled/ directories contain + particular configuration snippets which manage modules, global configuration + fragments, or virtual host configurations, respectively. +
  • + +
  • + They are activated by symlinking available + configuration files from their respective + *-available/ counterparts. These should be managed + by using our helpers + + a2enmod, + a2dismod, + + + a2ensite, + a2dissite, + + and + + a2enconf, + a2disconf + . See their respective man pages for detailed information. +
  • + +
  • + The binary is called apache2. Due to the use of + environment variables, in the default configuration, apache2 needs to be + started/stopped with /etc/init.d/apache2 or apache2ctl. + Calling /usr/bin/apache2 directly will not work with the + default configuration. +
  • +
+
+ +
+
+ Document Roots +
+ +
+

+ By default, Ubuntu does not allow access through the web browser to + any file apart of those located in /var/www, + public_html + directories (when enabled) and /usr/share (for web + applications). If your site is using a web document root + located elsewhere (such as in /srv) you may need to whitelist your + document root directory in /etc/apache2/apache2.conf. +

+

+ The default Ubuntu document root is /var/www/html. You + can make your own virtual hosts under /var/www. This is different + to previous releases which provides better security out of the box. +

+
+ +
+
+ Reporting Problems +
+
+

+ Please use the ubuntu-bug tool to report bugs in the + Apache2 package with Ubuntu. However, check existing + bug reports before reporting a new bug. +

+

+ Please report bugs specific to modules (such as PHP and others) + to respective packages, not to the web server itself. +

+
+ + + + +
+
+
+

+ Valid XHTML 1.0 Transitional +

+
+ + + diff --git a/opencaching.conf b/opencaching.conf new file mode 100644 index 0000000..131d2bb --- /dev/null +++ b/opencaching.conf @@ -0,0 +1,13 @@ + + + Options FollowSymLinks + AllowOverride All + Require all granted + + + ServerName localhost + ServerAlias local.opencaching.de + DocumentRoot /var/www/html/ocde/htdocs + LogLevel warn + ServerSignature Off +