Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R medvedev/hw5 #585

Open
wants to merge 8 commits into
base: RMedvedev/main
Choose a base branch
from
Open

R medvedev/hw5 #585

wants to merge 8 commits into from

Conversation

RofFlexor
Copy link

No description provided.

code/index.php Outdated
@@ -0,0 +1,31 @@
<?php
declare(strict_types = 1);
header('Content-Type: application/json; charset=utf-8');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше использовать шаблон фронт контроллер и сделать index.php максимально простым:

$app = new App();
echo $app->run();

ports:
- "80:80"
volumes:
- ./code/:/var/www/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

У Вас вся папка с кодом доступна nginx и соответственно все файлы могу запросить напрямую через браузер, например тот же .env и получить все пароли. Это крайне плохо. Сделайте папку public, положите туда только index.php и используйте эту папку как корень в nginx.

# Conflicts:
#	.gitignore
#	docker-compose.yaml
#	docker/nginx/conf.d/application.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants