From d558a656093f84e9b1087f76f56f9dd955f30f06 Mon Sep 17 00:00:00 2001 From: Tiara Rodney Date: Sun, 10 Apr 2022 13:41:46 +0200 Subject: [PATCH] fix(samples/httpaste.it): restrict httpd host disallow any host not httpaste.it --- samples/httpaste.it/httpd/httpd.conf | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/samples/httpaste.it/httpd/httpd.conf b/samples/httpaste.it/httpd/httpd.conf index 0ac6021..04b90e0 100644 --- a/samples/httpaste.it/httpd/httpd.conf +++ b/samples/httpaste.it/httpd/httpd.conf @@ -15,6 +15,7 @@ LoadModule env_module modules/mod_env.so LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so LoadModule unixd_module modules/mod_unixd.so +LoadModule access_compat_module modules/mod_access_compat.so User www-data @@ -47,9 +48,16 @@ LogLevel warn ServerName 127.0.0.1 + + + Deny from all + Allow from none + + + #ProxyPreserveHost On + ServerName httpaste.it SetEnv proxy-sendchunks - - ProxyPass "/" "unix:/shared/uwsgi.sock|uwsgi://localhost/" - \ No newline at end of file + ProxyPass "/" "unix:/shared/uwsgi.sock|uwsgi://localhost/" +