repaired trailing slash, plus admin auth

This commit is contained in:
Milan Toman
2024-02-21 12:27:40 +01:00
parent 8ef1c729d8
commit 7938ff2d29
2 changed files with 51 additions and 11 deletions

View File

@@ -1,5 +1,7 @@
server { server {
listen 81 default_server; listen 81 default_server;
port_in_redirect off;
absolute_redirect off;
root /app; root /app;
index index.php index.html index.htm; index index.php index.html index.htm;
location ~ \.php$ { location ~ \.php$ {
@@ -9,17 +11,7 @@ server {
} }
location /admin { location /admin {
auth_basic "Administrators Area"; auth_basic "Administrators Area";
auth_basic_user_file conf/htpasswd; auth_basic_user_file conf.d/htpasswd.pwd;
} }
} }
#server {
# listen 82 default_server;
# root /app/master/www;
# index index.php index.html index.htm;
# location ~ \.php$ {
# fastcgi_pass php:9000;
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# include fastcgi_params;
# }
#}

48
www/admin/index.php Normal file
View File

@@ -0,0 +1,48 @@
<?
include "../lib/mysql_connect.php";
?>
<!DOCTYPE html>
<html lang="cs">
<head>
<title>Kolem Kalů - ADMIN//24</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://www.w3schools.com/lib/w3-theme-black.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">
</head>
<style>
#menu{
min-height: 300px;
}
</style>
<body>
<!-- First Grid: Logo & About -->
<div class="w3-row w3-black" id="title">
<div class="w3-full w3-center w3-black">
<div class="w3-green w3-round-xxlarge">
<h1>Kalské Borec <span class="w3-green">//ADMIN</span></h1>
</div>
</div>
<!-- Content -->
<div class="w3-row w3-black">
<div class="w3-quarter w3-center w3-black" id="menu">
<form action="./admin.php?create=1" method="post">
<div class="w3-container w3-padding"><button class="w3-padding">Create Table</button></div>
</form>
<form action="./admin.php?delete=1" method="post">
<div class="w3-container w3-padding"><button class="w3-padding">Delete Table</button></div>
</form>
<form action="./admin.php?show_table=1" method="post">
<div class="w3-container w3-padding"><button class="w3-padding">Registered</button></div>
</form>
</div>
<div class="w3-threequarter w3-white" id="content">
Content
</div>
</div>
</div>
</body>
</html>