User Tools

Site Tools


snappy core

Secure base server first:-

Then some more with this:-

Then install nginx in docker:-

sudo docker run -i -t -p 80:80 ubuntu /bin/bash

!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Remember: You will be attached to the container you create. In order to detach yourself and go back to your main terminal access point, run the escape sequence: CTRL+P followed by CTRL+Q. Being attached to a docker container is like being connected to a new droplet from inside another.

To attach yourself back to this container:

List all running containers using sudo docker ps Find its ID Use sudo docker attach [id] to attach back to its terminal

user@Docker:~$ sudo docker attach c1a23d62a5f2

FATA[0000] You cannot attach to a stopped container, start it first

user@Docker:~$ sudo docker start c1a23d62a5f2

user@Docker:~$ sudo docker attach c1a23d62a5f2


echo “deb raring main universe” » /etc/apt/sources.list

apt-get update

apt-get install -y nano \
                   wget \
                   dialog \
 apt-get install -y nginx    

 sudo apt-get install php5-fpm php5-gd 

sudo nano /etc/php5/fpm/php.ini

Search for and adjust the cgi.fix_pathinfo parameter so that it reads like this:

cgi.fix_pathinfo=0 Save and close the file when you are done.

sudo nano /etc/nginx/sites-available/default

uncomment the php stuff and add the two additional “location” lines. These two lines fix the “not secure” message during setup, but this is not as good as moving the directories out of the document root (which I couldn't get to work)

 location ~ \.php$ {
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
        #       # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
        #       # With php5-cgi alone:
        #       fastcgi_pass;
                # With php5-fpm:
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;
        location ~ /(data|conf|bin|inc)/ {
        deny all;

nano /usr/share/nginx/html/phpinfo.php <?php phpinfo(); ?>

start services and check that phpinfo displays

sudo nginx

sudo php5-fpm or

sudo restart php5-fpm

sudo nginx -s reload

moving directories.

My current theory is that DokuWiki needs to run through its complete install routine before the local.php file is created and made to point to a new location for the /data folders.

followed this, but could not configure dokuwiki to access the moved directories.

full install guide for dokuwiki on nginx

premade nginx for docker from nginx:-

docker security:-

docker hub prebuilt dokuwiki:-

small docker images:-

smallest docker app:-

smaller ubuntu snappy/core for docker

docker.txt · Last modified: 2018/08/10 20:15 (external edit)