From 045ce3cec1f2a389149916751b23b382e6c23559 Mon Sep 17 00:00:00 2001 From: Gab <24553253+gabrix73@users.noreply.github.com> Date: Tue, 10 Jun 2025 12:41:44 +0200 Subject: Create onion-virtualhost.conf --- onion-virtualhost.conf | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 onion-virtualhost.conf diff --git a/onion-virtualhost.conf b/onion-virtualhost.conf new file mode 100644 index 0000000..1e3b5fd --- /dev/null +++ b/onion-virtualhost.conf @@ -0,0 +1,32 @@ + + ServerName qgaswy4ebtrhaargqvoboutky7xoyyx5rq5nhydixemkniresdze5dyd.onion + + DocumentRoot /var/www + + # Proxy all requests to Go app + ProxyPreserveHost On + ProxyPass / http://127.0.0.1:8080/ + ProxyPassReverse / http://127.0.0.1:8080/ + + # Proxy timeouts + ProxyTimeout 30 + + # Abilita HTTP/2 + Protocols h2 http/1.1 + + # Header di sicurezza + Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" + Header always set X-XSS-Protection "1; mode=block" + + # Disattiva accesso da IP esterni + + Require ip 127.0.0.1 + + + # Logging + LogLevel warn + ErrorLog ${APACHE_LOG_DIR}/onion-newsreader_error.log + CustomLog ${APACHE_LOG_DIR}/onion-newsreader_access.log anonymized_log + -- cgit v1.2.3