diff options
| -rw-r--r-- | onion-virtualhost.conf | 32 |
1 files changed, 32 insertions, 0 deletions
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 @@ +<VirtualHost 127.0.0.1:8043> + 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 + <Location /> + Require ip 127.0.0.1 + </Location> + + # Logging + LogLevel warn + ErrorLog ${APACHE_LOG_DIR}/onion-newsreader_error.log + CustomLog ${APACHE_LOG_DIR}/onion-newsreader_access.log anonymized_log +</VirtualHost> |
