-
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.
home-manager/nginx: add default htmls, adminer
adminer for administrating databases can be accessed from localhost/adminer.php Signed-off-by: John Titor <[email protected]> fixup hm Signed-off-by: John Titor <[email protected]>
- Loading branch information
1 parent
04349bb
commit b99d8d2
Showing
5 changed files
with
139 additions
and
0 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 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,16 @@ | ||
# this config file places relevant files in the home directory | ||
# for the nginx localhost webserver | ||
# THIS ONLY PLACES THE CONFIG FILES, DOES NOT INSTALL NGINX | ||
# For that see ../../dev-environment/nginx.nix | ||
# Import of thie module is controlled by bool: servicesSettings.nginx | ||
{pkgs, ...}: { | ||
home.file = { | ||
"Website-Instances/index.php".source = ./index.php; | ||
"Website-Instances/logos/nginx-logo.png".source = ./logos/nginx-logo.png; | ||
"Website-Instances/logos/nixos-logo.png".source = ./logos/nixos-logo.png; | ||
|
||
# To use adminer, just type localhost/adminer.php in your browser | ||
# This configuration automatically places the php file in the correct location | ||
"Website-Instances/adminer.php".source = "${pkgs.adminer}/adminer.php"; | ||
}; | ||
} |
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,118 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | ||
|
||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | ||
<head> | ||
<title>Test Page for the Nginx HTTP Server</title> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | ||
<style type="text/css"> | ||
/*<![CDATA[*/ | ||
body { | ||
background-color: #fff; | ||
color: #000; | ||
font-size: 0.9em; | ||
font-family: sans-serif,helvetica; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
:link { | ||
color: #c00; | ||
} | ||
:visited { | ||
color: #c00; | ||
} | ||
a:hover { | ||
color: #f50; | ||
} | ||
h1 { | ||
text-align: center; | ||
margin: 0; | ||
padding: 0.6em 2em 0.4em; | ||
background-color: #294172; | ||
color: #fff; | ||
font-weight: normal; | ||
font-size: 1.75em; | ||
border-bottom: 2px solid #000; | ||
} | ||
h1 strong { | ||
font-weight: bold; | ||
font-size: 1.5em; | ||
} | ||
h2 { | ||
text-align: center; | ||
background-color: #3C6EB4; | ||
font-size: 1.1em; | ||
font-weight: bold; | ||
color: #fff; | ||
margin: 0; | ||
padding: 0.5em; | ||
border-bottom: 2px solid #294172; | ||
} | ||
hr { | ||
display: none; | ||
} | ||
.content { | ||
padding: 1em 5em; | ||
} | ||
.alert { | ||
border: 2px solid #000; | ||
} | ||
|
||
img { | ||
border: 2px solid #fff; | ||
padding: 2px; | ||
margin: 2px; | ||
} | ||
a:hover img { | ||
border: 2px solid #294172; | ||
} | ||
.logos { | ||
margin: 1em; | ||
text-align: center; | ||
} | ||
/*]]>*/ | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<h1>Welcome to <strong>nginx</strong></h1> | ||
|
||
<div class="content"> | ||
<p>This page is used to test the proper operation of the | ||
<strong>nginx</strong> HTTP server after it has been | ||
installed. If you can read this page, it means that the | ||
web server installed at this site is working | ||
properly.</p> | ||
|
||
<div class="alert"> | ||
<h2>Website Administrator</h2> | ||
<div class="content"> | ||
<p>This is the default <tt>index.php</tt> page that | ||
is located in | ||
<tt>/var/www/localhost-server/index.php</tt>.</p> | ||
|
||
|
||
<?php | ||
echo "If you see this text, PHP is also installed and working.<br/>"; | ||
echo 'Current PHP version: ' . phpversion(); | ||
?> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="logos"> | ||
<a href="http://nginx.net/"><img | ||
src="./logos/nginx-logo.png" | ||
alt="[ Powered by nginx ]" | ||
width="121" height="32" /></a> | ||
|
||
<a href="https://nixos.org/"><img | ||
src="./logos/nixos-logo.png" | ||
alt="[ Powered by NixOS ]" | ||
width="110" height="32" /></a> | ||
</div> | ||
</div> | ||
</body> | ||
</html> | ||
|
||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.