diff options
| author | Gab <24553253+gabrix73@users.noreply.github.com> | 2025-06-10 12:41:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-10 12:41:44 +0200 |
| commit | 045ce3cec1f2a389149916751b23b382e6c23559 (patch) | |
| tree | 6d3325b5835007cbbb21c0f42feb5cf4a5b88c92 | |
| parent | 12edaac0b7c59e506df15d73393d531fdcc12e91 (diff) | |
| download | onion-newsreader-045ce3cec1f2a389149916751b23b382e6c23559.tar.gz onion-newsreader-045ce3cec1f2a389149916751b23b382e6c23559.tar.xz onion-newsreader-045ce3cec1f2a389149916751b23b382e6c23559.zip | |
Create onion-virtualhost.conf
| -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> |
