1
0
Fork 0

Challenge update, compatible new archi and less frustrating

This commit is contained in:
Aymeric 2019-03-31 18:56:07 +02:00
parent f495725c81
commit fabc56ae62
6 changed files with 19 additions and 33 deletions

View File

@ -4,19 +4,24 @@ services:
web:
image: nginx:latest
ports:
- "8080:80"
- "80:80"
volumes:
- ./webroot:/webroot
- ./resources/nginx/default.conf:/etc/nginx/conf.d/default.conf
- ./resources/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./log/nginx:/var/log/nginx
links:
- php
- ./webroot:/webroot:ro
- ./resources/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
- ./resources/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
networks:
- backend
restart: always
php:
build: ./php/
volumes:
- ./webroot:/webroot
- ./resources/php/custom.ini:/usr/local/etc/php/conf.d/custom.ini
- ./webroot:/webroot:ro
- ./resources/php/custom.ini:/usr/local/etc/php/conf.d/custom.ini:ro
networks:
- backend
restart: always
networks:
backend:
driver: bridge

View File

@ -1,4 +1,4 @@
FROM php:7.2-fpm
FROM php:7.3-fpm
MAINTAINER Aymeric Sorek "aymericsorek@protonmail.com"

View File

@ -4,9 +4,6 @@ server {
index index.php;
server_name localhost;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /webroot;
location ~ \.php$ {

View File

@ -23,22 +23,6 @@ http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Headers
##
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##

View File

@ -2,7 +2,7 @@ expose_php = Off
error_reporting = E_ALL
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors = Off
error_log = /var/log/php/php_error.log
ignore_repeated_errors = Off
allow_url_fopen = Off

View File

@ -33,14 +33,14 @@
<?php
} else {
$username = htmlspecialchars($_POST['username']);
$username = strtolower(htmlspecialchars($_POST['username']));
if ($username === 'admin') {
if ($username === 'admin' || $username === 'root' || $username === 'administrator') {
?>
<div class="sub">
<h2 class="blue">Hello admin</h2>
<h3 class="grey">IMTLD{Y0u_H4v3_t0_st4rT_s0m3Wh3r3}</h3>
<h3 class="grey">SPACE{y0u_H4v3_t0_St4rt_S0m3Wh3r3}</h3>
</div>
<?php } else { ?>