Skip to content

Commit 4842aa5

Browse files
committed
updated css for index info page
1 parent b96151d commit 4842aa5

File tree

3 files changed

+73
-63
lines changed

3 files changed

+73
-63
lines changed

app/index.php

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1+
<!-- DO NOT MODIFY THIS FILE IT IS CREATED EACH TIME THE INSTANCE IS STARTED -->
12
<!DOCTYPE html>
23
<html>
34
<head>
45
<title>Coming soon!</title>
56
<!-- Latest compiled and minified CSS -->
6-
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
7+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
78
<style>
89
body {
9-
font-family: 'Open Sans', sans-serif;
10-
font-weight: 300;
11-
font-size: 14px;
12-
text-align: center;
13-
padding: 50px;
10+
font-family: 'Open Sans', sans-serif;
11+
font-weight: 300;
12+
font-size: 14px;
13+
text-align: center;
14+
padding: 50px;
1415
}
1516
div img#logo {
16-
margin: 0 auto 40px auto;
17+
margin: 0 auto 40px auto;
1718
float: none;
1819
}
1920
.e {
@@ -38,7 +39,8 @@
3839
table {
3940
border-collapse: collapse;
4041
border: 0;
41-
width: 934px;
42+
width: 80% !important;
43+
margin: auto;
4244
}
4345
td, th {
4446
border: 1px solid #666;
@@ -67,8 +69,8 @@
6769
<img id="logo" src="logo.png" width="200" />
6870
<h1><?= "Hello ".((getenv("NAME"))? $name:"World")."!"; ?></h1>
6971

70-
<div class="row center">
71-
<div class="col-xs-8 col-xs-offset-2">
72+
<div class="row">
73+
<div class="mx-auto w-100 p-3 text-white text-center">
7274
<table class="table table-bordered table-striped">
7375
<tbody>
7476
<tr>
@@ -128,6 +130,8 @@
128130
$pinfo = preg_replace( '%^.*<body>(.*)</body>.*$%ms','$1', ob_get_contents());
129131
ob_end_clean();
130132
echo $pinfo;
133+
} else {
134+
echo '<a href="https://github.com/htmlgraphic/Apache">GitHub</a>';
131135
}
132136
?>
133137
</div>

app/php_extensions.php

Lines changed: 53 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,56 @@
11
<?php
2-
# Ensure that chars show in browser correctly.
3-
header('Content-Type: text/plain; charset=utf-8');
4-
5-
// The following modules, should exist in the build
6-
$modules = 'apache2handler,calendar,ctype,curl,date,dom,exif,fileinfo,filter,ftp,gd,gettext,hash,iconv,imagick,json,libxml,mbstring,mcrypt,mysqli,mysqlnd,openssl,pcre,pdo,pdo_mysql,phar,posix,readline,reflection,session,shmop,simplexml,sockets,spl,standard,sysvmsg,sysvsem,sysvshm,tokenizer,xml,xmlreader,xmlwriter,xsl,opcache.enable,zip,zlib, mod_deflate, mod_filter';
7-
8-
$mods_check = array_map('trim', explode(",",$modules));
9-
10-
// Sort alphabetically.
11-
sort($mods_check);
12-
13-
// Get regular (non-Zend) extensions.
14-
$apache_modules = apache_get_modules();
15-
$mods = get_loaded_extensions();
16-
17-
// 'zend_extensions' param only introduced in PHP 5.2.4,
18-
// setting the param returns NULL in PHP 5.1.
19-
$zend_mods = get_loaded_extensions(true);
20-
if ($zend_mods) {
21-
$mods = array_merge($mods, $zend_mods);
22-
}
23-
24-
25-
if ($apache_modules) {
26-
$mods = array_merge($mods, $apache_modules);
2+
// DO NOT MODIFY THIS FILE IT IS CREATED EACH TIME THE INSTANCE IS STARTED
3+
if (getenv("NODE_ENVIRONMENT") == 'dev') {
4+
5+
# Ensure that chars show in browser correctly.
6+
header('Content-Type: text/plain; charset=utf-8');
7+
8+
// The following modules, should exist in the build
9+
$modules = 'apache2handler,calendar,ctype,curl,date,dom,exif,fileinfo,filter,ftp,gd,gettext,hash,iconv,imagick,json,libxml,mbstring,mcrypt,mysqli,mysqlnd,openssl,pcre,pdo,pdo_mysql,phar,posix,readline,reflection,session,shmop,simplexml,sockets,spl,standard,sysvmsg,sysvsem,sysvshm,tokenizer,xml,xmlreader,xmlwriter,xsl,opcache.enable,zip,zlib, mod_deflate, mod_filter';
10+
11+
$mods_check = array_map('trim', explode(",",$modules));
12+
13+
// Sort alphabetically.
14+
sort($mods_check);
15+
16+
// Get regular (non-Zend) extensions.
17+
$apache_modules = apache_get_modules();
18+
$mods = get_loaded_extensions();
19+
20+
// 'zend_extensions' param only introduced in PHP 5.2.4,
21+
// setting the param returns NULL in PHP 5.1.
22+
$zend_mods = get_loaded_extensions(true);
23+
if ($zend_mods) {
24+
$mods = array_merge($mods, $zend_mods);
25+
}
26+
27+
28+
if ($apache_modules) {
29+
$mods = array_merge($mods, $apache_modules);
30+
}
31+
32+
$mods = array_map('strtolower', $mods);
33+
// Remove duplicates.
34+
$mods = array_unique($mods);
35+
print 'Enabled Module / Extensions: (✓ indicates required)' ."\n\n";
36+
37+
#
38+
# Output modules table.
39+
#
40+
foreach($mods as $mod) {
41+
# Search for Apache module, does it exist
42+
printf('%-18s', $mod);
43+
44+
if(in_array($mod, $mods_check)) {
45+
echo '| ✓ ';
46+
} else {
47+
echo '| ';
48+
}
49+
echo "\n";
50+
}
51+
52+
} else {
53+
echo 'NODE_ENVIRONMENT: <strong>'. getenv("NODE_ENVIRONMENT") .'</strong>';
2754
}
2855

29-
30-
$mods = array_map('strtolower', $mods);
31-
32-
33-
// Remove duplicates.
34-
$mods = array_unique($mods);
35-
print 'Enabled Module / Extensions: (✓ indicates required)' ."\n\n";
36-
37-
38-
#
39-
# Output modules table.
40-
#
41-
foreach($mods as $mod) {
42-
# Search for Apache module, does it exist
43-
printf('%-18s', $mod);
44-
45-
if(in_array($mod, $mods_check)) {
46-
echo '| ✓ ';
47-
} else {
48-
echo '| ';
49-
}
50-
echo "\n";
51-
}
56+
echo '<br /><br /><a href="https://github.com/htmlgraphic/Apache">GitHub</a>';

app/run.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ OutputLog ()
1717

1818

1919

20-
21-
2220
# output logs to logentries.com
2321
cat <<EOF > /etc/rsyslog.d/logentries.conf
2422
\$template Logentries,"${LOG_TOKEN} %HOSTNAME% %syslogtag%%msg%\n"
@@ -29,13 +27,16 @@ EOF
2927

3028
if [ ! -d /data/www/public_html ]; then
3129

32-
# Move default coming soon page...
30+
# Create default web directory
3331
mkdir -p /data/www/public_html
34-
mv /opt/app/*.php /data/www/public_html/
3532
mv /opt/app/*.png /data/www/public_html/
36-
3733
fi
3834

35+
# Move default coming soon page... at the start of every instance run
36+
mv /opt/app/*.php /data/www/public_html/
37+
38+
39+
3940

4041
if [ ! -d /data/apache2 ]; then
4142

0 commit comments

Comments
 (0)