Netlite IT

  • COSA
    • Auctory
    • Automazione Industriale
    • Sviluppo Software
    • Cloud
    • Consulenza Sistemistica
    • Sicurezza
    • Block Chain
    • Idee e Partnership
    • Jobs
  • DOVE
  • KB
  • CONTATTO
    • Privacy

Reverse Proxy

by netlite-team / lunedì, 27 Maggio 2013 / Published in Sistemistica, Tips & Tricks

Configurazione tipo per un reverse proxy SSL basato su Gentoo Linux e apache2

TimeOut 30
SetOutputFilter DEFLATE
AddOutputFilterByType INCLUDES application/pdf
AddEncoding x-gzip .gz
AddType application/x-javascript .gz
AddType application/javascript .gz
BrowserMatch Firefox/1\.0\.[0-9] no-gzip
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
BrowserMatch "MSIE 6" no-gzip gzip-only-text/html
SetEnvIfNoCase Request_URI \.(gif|jpg|jpeg|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(htm|html|js|jsp|asp|php|do)$ !no-gzip
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(gif|jpg|jpeg|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(htm|html|js|jsp|asp|php|do)$ !no-gzip
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
Header append Vary User-Agent env=!dont-vary
#SetEnvIfNoCase Request_URI \.* no-gzip dont-vary
#SetEnvIfNoCase Request_URI \.jsp$ !no-gzip !dont-vary
#SetEnvIfNoCase Request_URI \.htm$ !no-gzip !dont-vary
#SetEnvIfNoCase Request_URI \.html$ !no-gzip !dont-vary
#SetEnvIfNoCase Request_URI \.asp$ !no-gzip !dont-vary
DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio
DeflateWindowSize 15
DeflateMemLevel 9
DeflateCompressionLevel 9
ServerName nome_server
LoadModule proxy_module modules/mod_proxy.so
LoadModule ssl_module modules/mod_ssl.so
SetEnvIf User-Agent ".*MSIE.*" ssl-unclean-shutdown
SSLSessionCache shm:/var/cache/apache2/ssl_scache(4096000)
SSLSessionCacheTimeout 600
LogLevel error
ErrorLog /var/log/apache2/ssl_error_log
Listen 80
Options -All -Multiviews
AllowOverride None
Order allow,deny
Allow from all
DocumentRoot /home/domini-web/locale/www
# ServerName nome_server
# ServerAlias alias_server
DirectoryIndex index.shtml index.php index.php3 index.html
ScriptAlias /cgi-bin/ /home/domini-web/locale/cgi-bin/
CustomLog /var/log/apache2/access_log combined
AddHandler server-parsed shtml
Options +Includes
Options -Indexes -All -Multiviews +Includes
AllowOverride None
Order allow,deny
Allow from all
Include /etc/apache2/conf/*.conf

/etc/apache2/conf/server_A.conf

Listen 400
#
RewriteEngine on
#RewriteCond %{REQUEST_URI} !^/galileo/public/
#RewriteCond %{REQUEST_URI} !^/galileo/
#RewriteRule / /galileo/public/menu.faces [R,L]
# direttive proxypass ------------------------------------------
ProxyPass / http://X.X.X.X:8888/ retry=0 ttl=120 timeout=120
ProxyPassReverse / http://X.X.X.X:8888/
# autenticazione server ------------------------------------------
SSLEngine On
#128bit
SSLCipherSuite RC4-SHA:RC4-MD5:HIGH:MEDIUM:!ADH:!DSS:!SSLv2:+3DES
SSLHonorCipherOrder on
# 40 bit
#SSLCipherSuite ALL:!ADH:!EXPORT56:!EXPORT40:!SSLv2:!LOW
SSLCertificateFile /etc/apache2/ssl/server.crt
#SSLCertificateChainFile /etc/apache2/ssl/cert-new.verisign.pem
#SSLCertificateChainFile /etc/apache2/ssl/cert.verisign.pem
SSLCertificateChainFile /etc/apache2/ssl/intermediate_good.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.nopassword.key
# autenticazione client ------------------------------------------
# accesso permesso solo in presenza di comunicazione almeno a 128bit
ErrorDocument 403 http://www.tuo_sito.it/
ErrorDocument 404 http://www.tuo_sito.it/
#SSLCACertificateFile /etc/apache2/ssl/client/CAcert.chain
#SSLCARevocationFile /etc/apache2/ssl/crl.pem
#SSLVerifyClient none
#SSLVerifyDepth 10
#SSLOptions +StdEnvVars
 
ServerName www.tuo_sito.it
#ServerAlias Y.Y.Y.Y
ProxyRequests on
ProxyVia on
AddOutputFilterByType SUBSTITUTE text/html
#Eventuale sostituzione del testo proxato
#Substitute "s|test_da_sostituire|vuoto|i"
# eventuale log verso syslog esterno
#CustomLog "|/usr/bin/logger -t reverseproxy -n syslog " combined
 

 

Ulteriori personalizzazioni possono essere inserite riguardi a questi tre moduli:

mod_evasive

mod_cband

mod_security

  • Tweet
Tagged under: apache, linux, reverse proxy

About netlite-team

What you can read next

LTSP Ubuntu Remote Desktop con PC di Recupero
PROXMOX tips
OpenVPN con più VPN attive contemporaneamente

Lascia un commento Annulla risposta

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Questo sito utilizza Akismet per ridurre lo spam. Scopri come vengono elaborati i dati derivati dai commenti.

Ricerca

Recent Posts

  • Qemu fsfreeze hook

    Tratto da https://kb.kurgan.org/PVE Uso di Qemu...
  • Autenticazione SSSD/LDAP su AD

    /etc/portage/package.use emerge sssd /etc/sshd/...
  • HP Tools per il controller SAS [SSACLI]

    Crea un file hp.list in /etc/apt/sources.list.d...
  • Reverse Proxy Apache HTTPS High Security and Mod_Security

    andrea...
  • Debian Bonding LACP con Switch HP 1820-24G

    Una volta configurato lo switch HP 1820-24G Swi...

Recent Comments

  • PROXMOX RAID Setup | netlite su PROXMOX tips

Archives

  • Maggio 2019
  • Febbraio 2019
  • Ottobre 2018
  • Settembre 2018
  • Aprile 2018
  • Agosto 2017
  • Luglio 2017
  • Giugno 2017
  • Aprile 2015
  • Dicembre 2014
  • Novembre 2014
  • Ottobre 2014
  • Settembre 2014
  • Agosto 2014
  • Giugno 2014
  • Marzo 2014
  • Febbraio 2014
  • Dicembre 2013
  • Settembre 2013
  • Agosto 2013
  • Luglio 2013
  • Giugno 2013
  • Maggio 2013

Categories

  • Android
  • APP
  • Cluster
  • Networking
  • Non categorizzato
  • Sistemistica
  • Tips & Tricks
  • Virtualizzazione
  • vpn
  • Windows

Meta

  • Accedi
  • Feed dei contenuti
  • Feed dei commenti
  • WordPress.org

Featured Posts

  • Qemu fsfreeze hook

    0 comments
  • Autenticazione SSSD/LDAP su AD

    0 comments
  • HP Tools per il controller SAS [SSACLI]

    0 comments
  • Reverse Proxy Apache HTTPS High Security and Mod_Security

    0 comments
  • Debian Bonding LACP con Switch HP 1820-24G

    0 comments

NETLITE SNC

Corso Vittorio Emanuele II, 188
37069 Villafranca di Verona (VR)
C.C.I.A.A di Verona N.ro 364993
PIVA/CF 03782800233

Piazza della Manifattura,1 38068 Rovereto (TN)
Via Walter Fleming, 13 37026 Settimo di Pescantina (VR)
Via Norberto Bobbio, 9 20096 Pioltello (MI)

Contatti

Tel: +39 045 4856656
Fax: +39 045 4856655
Email: [email protected]
PEC: [email protected]
Codice Destinatario: M5UXCR1

Contacts

Phone: +39 045 4856656
Fax: +39 045 4856655
email: [email protected]
Netlite IT


© 2008-2025
All rights reserved.

TOP