Commit c6274de8 by Bruno Bzeznik

Fake a domain name phylodev.org

parent 991940bc
Creates a nixos-container suitable for developments and testing of phyloalps.
Phylodev
========
Creates a nixos-container suitable for developments and testing of phyloalps. This requires a NixOS as the base system.
There are 3 parts:
......@@ -8,22 +11,34 @@ There are 3 parts:
* A script "store/init.sh" which is called inside the container, this is where most of the phyloalps configuration is done
The result is a running nixos-container with a devel/test phyloalps application running inside.
Usage:
------
* Create the container configuration (as root):
* Edit the file `/etc/nixos/configuration.nix` of your NixOS host (as root):
* Add the container configuration as an imported file:
```
cp phylodb-container.nix /etc/nixos/
# Add this file into the imports of /etc/nixos/configuration.nix:
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
# Include containers configurations
./phylodb-container.nix
];
```
```
* Add a host entry for the phylodev fake domain:
```
networking.hosts = {
"127.0.0.1" = [ "localhost" "data.phylodev.org" ];
"::1" = [ "localhost" ];
};
```
* Copy the container configuration file (as root):
```
cp phylodb-container.nix /etc/nixos/
```
* Launch the initialization script that will start and finalize the phylodb installation:
......
......@@ -43,19 +43,19 @@
enable = true;
package = pkgs.apacheHttpd;
adminAddr = "info@phyloalps.org";
hostName = "phylodb.u-ga.fr";
hostName = "localhost";
logPerVirtualHost = true;
extraModules = ["proxy" "proxy_http" "cache"];
virtualHosts = [
{
hostName = "data.phyloalps.org";
hostName = "data.phylodev.org";
documentRoot = "/var/lib/phyloalps/phylodb";
extraConfig = ''
ProxyPassReverse / http://localhost:8888/
RewriteEngine on
RewriteRule ^/\.well-known/?(.*)$ http://data.phyloalps.org/static/%{REQUEST_URI} [L,P]
RewriteRule ^/\.well-known/?(.*)$ http://data.phylodev.org/static/%{REQUEST_URI} [L,P]
RewriteRule ^/static/?(.*)$ - [L,P]
RewriteRule ^/(.*)$ http://localhost:8888/$1 [P]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment