This commit is contained in:
Imam Syahid Hudzaifah 2025-08-12 11:04:57 +07:00
parent e326816fb7
commit 9bc2d24569
3 changed files with 28 additions and 4 deletions

View File

@ -9,9 +9,10 @@
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /
ProxyPass /hcportal http://127.0.0.1:80/app retry=1 acquire=3000 timeout=600 Keepalive=On
<Directory /app>
DocumentRoot /app/src/api
<Directory /app/src/api>
Options Indexes FollowSymLinks
DirectoryIndex index.php
AllowOverride All
Require all granted

View File

@ -19,15 +19,21 @@ services:
- hcportalnetwork
volumes:
- ./be:/app
- ./apache-config.conf:/etc/apache2/sites-available/000-default.conf:ro
- backend-vendor:/app/src/api/vendor
owasp:
container_name: owasp-hcportal
image: owasp/modsecurity-crs:3.3.5-nginx-202401080101
environment:
- backend=http://be:80
- BACKEND=http://be:80
- BACKEND_PROTO=http
- PORT=80
networks:
- hcportalnetwork
ports:
- 8888:80
volumes:
- ./nginx-config/custom-buffers.conf:/etc/nginx/conf.d/custom-buffers.conf:ro
links:
- be
depends_on:
@ -35,3 +41,6 @@ services:
networks:
hcportalnetwork:
driver: bridge
volumes:
backend-vendor:

View File

@ -0,0 +1,14 @@
# Custom buffer size configuration to handle large headers and cookies
client_header_buffer_size 16k;
large_client_header_buffers 8 32k;
client_max_body_size 100M;
client_body_buffer_size 128k;
# Additional proxy buffer settings
proxy_buffer_size 16k;
proxy_buffers 8 32k;
proxy_busy_buffers_size 64k;
# Prevent X-Forwarded-For header from growing infinitely
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;