forked from GreenFrogSB/LMDS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request GreenFrogSB#68 from GreenFrogSB/dev
Dev - WebServ-v2.5
- Loading branch information
Showing
16 changed files
with
171 additions
and
4,222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
server { | ||
listen 80; | ||
server_name nginx02; | ||
|
||
# Log files for Debug | ||
error_log /var/log/nginx/error.log; | ||
access_log /var/log/nginx/access.log; | ||
|
||
# web root directory | ||
root /var/www/html/nginx02; | ||
index index.php index.html; | ||
|
||
location / { | ||
try_files $uri $uri/ /index.php?$query_string; | ||
gzip_static on; | ||
} | ||
|
||
# Nginx Pass requests to PHP-FPM | ||
location ~ \.php$ { | ||
try_files $uri =404; | ||
fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||
fastcgi_pass php-fpm8:9000; | ||
fastcgi_index index.php; | ||
include fastcgi_params; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | ||
client_max_body_size 256M; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,81 +7,43 @@ | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
|
||
<!-- Bootstrap CSS--> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBo$ | ||
|
||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous"> | ||
</head> | ||
|
||
<body class=" bg-dark"> | ||
|
||
|
||
<div class="container"> | ||
<div class="text-center pt-3"> | ||
<body class="bg-dark"> | ||
<div class="bg-dark"> | ||
<div class="container"> | ||
<div class="text-center pt-3"> | ||
<div class="bg-dark text-white"> | ||
<h1> LMDS WebServer is <font color=#3cfc44>UP </font>(<?php print $_SERVER['SERVER_SOFTWARE']; ?>)</h1> | ||
<h3 class="mb-3"> | ||
<font color=#009900>NGINX</font> + | ||
<font color=#cccccc>MariaDB</font> + | ||
<font color=#576490>PHP</font> + | ||
<font color=#6C78AF>php</font> | ||
<font color=#F89C0E>MyAdmin</font> | ||
</h3> | ||
|
||
<h1> LMDS <font color=#3cfc44> <?php print $_SERVER['SERVER_NAME']; ?> </font> Web Server is <font color=#3cfc44> UP </font></h1> | ||
<h3 class="mb-3"> | ||
<font color=#009900>NGINX</font> + | ||
<font color=#cccccc>MariaDB</font> + | ||
<font color=#576490>PHP</font> + | ||
<font color=#6C78AF>php</font> | ||
<font color=#F89C0E>MyAdmin</font> | ||
</h3> | ||
|
||
<p>This <font color=#55b5e2>index.php</font> file is locard in: <br> | ||
<font color=#edd207>~/LMDS/volumes/WebServ/ngnix01/www/html/index.php</font><br> | ||
<p> | ||
This <font color=#55b5e2>index.php</font> file location: <br> | ||
<font color=#edd207>~/LMDS/volumes/WebServ/<?php print $_SERVER['SERVER_NAME']; ?>/www/html/index.php</font><br> | ||
Replace it with your own project. | ||
</p> | ||
|
||
<p> | ||
<font color=#edd207>Use your favorite sFTP client to upload your project on the server.</font> <br> | ||
sFTP Server: <?php print strtok($_SERVER['HTTP_HOST'], ':'); ?><br> | ||
USER: Linux local user | ||
</p> | ||
|
||
<div class=" bg-dark text-white m-2"> | ||
<a target="_blank" href="http://<?php print $_SERVER{ | ||
'HTTP_HOST'}; ?>:8888"> | ||
<font color=#6C78AF>php</font> | ||
<font color=#F89C0E>MyAdmin</font> | ||
</a>: | ||
<?php print $_SERVER{ | ||
'HTTP_HOST'}; ?>:8888<br> | ||
|
||
<font color=#edd207>Trouble login into phpMyAdmin - use Chrome Incognito mode.</font> | ||
|
||
<br> | ||
SERVER: mariadb<br> | ||
USER: lmds <br> | ||
<a class=" bg-dark" target="_blank" href="http://<?php print strtok($_SERVER['HTTP_HOST'], ':'); ?>:8888"> phpMyAdmin</a>: | ||
<?php print strtok($_SERVER['HTTP_HOST'], ':'); ?>:8888<br> | ||
<font color=#edd207>Trouble login into phpMyAdmin - use Chrome Incognito mode.</font><br> | ||
MariaDB: <?php print strtok($_SERVER['HTTP_HOST'], ':'); ?>:3306<br> | ||
USER: lmds or root <br> | ||
PASSWORD: passw0rd <br> | ||
</div> | ||
|
||
<?php | ||
$dbname = 'lmdsdb'; | ||
$dbuser = 'lmds'; | ||
$dbpass = 'passw0rd'; | ||
$dbhost = 'mariadb'; | ||
|
||
$connect = mysqli_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'"); | ||
mysqli_select_db($connect, $dbname) or die("Could not open the db '$dbname'"); | ||
?> | ||
|
||
Database: <?php print $_SERVER{ | ||
'HTTP_HOST'}; ?>:3306<br> | ||
MariaDB: <?php echo $connect->server_info; ?> | ||
<?php | ||
|
||
$test_query = "SHOW TABLES FROM $dbname"; | ||
$result = mysqli_query($connect, $test_query); | ||
|
||
$tblCnt = 0; | ||
while ($tbl = mysqli_fetch_array($result)) { | ||
$tblCnt++; | ||
#echo $tbl[0]."<br />\n"; | ||
} | ||
|
||
if (!$tblCnt) { | ||
echo "<br>There are no tables in the Database"; | ||
} else { | ||
echo "<br>There are $tblCnt tables<br>"; | ||
} | ||
|
||
/* close connection */ | ||
$connect->close(); | ||
?> | ||
</div> | ||
</div> | ||
</div> | ||
|
@@ -90,7 +52,6 @@ | |
// Show all information, defaults to INFO_ALL | ||
phpinfo(); | ||
?> | ||
|
||
</body> | ||
|
||
</html> | ||
</div> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.