diff --git a/README.md b/README.md index 09c203a..3e55709 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ Containers between them will be connected through the `privnet` network which is ###### b) DNS -The `nginx` container is configured to only accept the host `mydomain.com`, it corresponds to the DNS record chosen for the production server. This domain must be added into the `/etc/hosts` file of each developer in order for them to access the web server at `mydomain.com:8080`. +The `nginx` container is configured to only accept the host `somedomain.io`, it corresponds to the DNS record chosen for the production server. This domain must be added into the `/etc/hosts` file of each developer in order for them to access the web server at `somedomain.io:8080`. diff --git a/virtual/etc/nginx/nginx.conf b/virtual/etc/nginx/nginx.conf index b2edacf..884685f 100644 --- a/virtual/etc/nginx/nginx.conf +++ b/virtual/etc/nginx/nginx.conf @@ -34,13 +34,13 @@ http { listen 80 default_server; listen [::]:80 default_server; - server_name mydomain.com www.mydomain.com; + server_name somedomain.io www.somedomain.io; root /vhost/public_html; index index.php; - error_log /var/log/nginx/mydomain.error.log; - access_log /var/log/nginx/mydomain.access.log main; + error_log /var/log/nginx/somedomain.error.log; + access_log /var/log/nginx/somedomain.access.log main; location / { try_files $uri $uri/ /index.php?url=$uri; diff --git a/virtual/vhost/public_html/index.php b/virtual/vhost/public_html/index.php index fe3c92d..bddd0bf 100644 --- a/virtual/vhost/public_html/index.php +++ b/virtual/vhost/public_html/index.php @@ -1,60 +1,86 @@ - +.blink { + color: #ff0000; - try{ + animation: blink-animation 1s steps(5, start) infinite; + -webkit-animation: blink-animation 1s steps(5, start) infinite; +} +.yay{ display: inline-block; color: #2AC940; font-size: 1.2em; margin: .5em; padding: 1em; border: 1px solid red; } +.faded{ opacity: .5; } +@keyframes blink-animation { to { visibility: hidden; } } +@-webkit-keyframes blink-animation { to { visibility: hidden; } } +a{ text-decoration: underline; color: inherit; } +h2 a { text-decoration: none; } + - $pdo = new PDO('mysql:host=mariadb;dbname=vhost;charset=utf8', "php", "Ew1RmFFqeZOA1zwkJkocAjmepQA4JmnUW0nqDFh79jHY8aubtPO_12E9wgbNvScX0Uiv1GuUllb8YCJ00PAoh0fvNS"); +
\n"); - foreach( $nonces as $key=>$value ){ - printf("[%d] nonce id %s created at %s\n", $key, $value['id_nonce'], date('H:i:s d/m/Y', $value['created_at'])); + $nonces = $st->fetchAll(); + printf("\n"); - }else{ - printf("* cannot fetch data\n\n"); - } + ?> - - - echo "my app"; \ No newline at end of file +\n"); + $max = count($nonces); + foreach( $nonces as $key=>$value ){ + if( $key == 0 ){ + printf("YOU ARE EXACTLY THE %dth VISITOR, CLICK HERE TO WIN THE PRIZE !!\n", $value['id_nonce']); + printf("\nWow ! Got lucky\n\n"); + continue; + } + printf("%s | You are the %dth visitor, click here to win the prize !!\n", date('H:i:s d/m/Y', $value['created_at']), $value['id_nonce']); + } + printf("\n"); + + }else{ + printf("* cannot fetch data\n\n"); } - printf("