Skip to content
This repository was archived by the owner on Feb 9, 2025. It is now read-only.

Commit 460be2e

Browse files
author
Ferry Ariawan
committed
Fix documentation
1 parent 22d54df commit 460be2e

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

docs/en/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,4 @@
5050
- [How To Make A Custom View Of Edit Method](./how-to-custom-edit-view.md)
5151
- [How To Make A Custom View Of Detail Method](./how-to-custom-detail-view.md)
5252
- [Helpers](./helpers.md)
53+
- [Secure Your Root Directory](./secure-root-directory.md)

docs/en/secure-root-directory.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Secure Root Project Directory
2+
This is very important to secure your project directory to prevent unwanted access
3+
### Code Sample
4+
5+
Create a htaccess to your root project, e.g: `/var/www/html/project/.htaccess`
6+
```bash
7+
# Disable server signature
8+
ServerSignature Off
9+
10+
# Disable directory listing
11+
IndexIgnore *
12+
13+
# Disable access to /vendor/*
14+
RewriteRule ^(.*)/vendor/.*\.(php|rb|py)$ - [F,L,NC]
15+
RewriteRule ^vendor/.*\.(php|rb|py)$ - [F,L,NC]
16+
17+
# Disable anything access to .htaccess, .env, etc
18+
<FilesMatch "^\.">
19+
Order allow,deny
20+
Deny from all
21+
</FilesMatch>
22+
```
23+
24+
## Table Of Contents
25+
- [Back To Index](./index.md)

0 commit comments

Comments
 (0)