Difference between revisions of "Nginx"

From PostgreSQL_wiki
Jump to: navigation, search
(New page: = mutli ssl single IP proxy = Leidt de gebruiker automatisch naar de secure Apache pagina van de URL. <pre> #NameVirtualHost *:80 <VirtualHost 194.151.143.203:80> ServerAdmin webma...)
 
(mutli ssl single IP proxy)
Line 1: Line 1:
 
= mutli ssl single IP proxy =
 
= mutli ssl single IP proxy =
Leidt de gebruiker automatisch naar de secure Apache pagina van de URL.
+
De nginx ssl proxy leidt het verkeer naar de secure Apache baclend.
 
<pre>
 
<pre>
  +
server {
#NameVirtualHost *:80
 
  +
server_name crm.webhuis.nl;
<VirtualHost 194.151.143.203:80>
 
  +
access_log /var/log/nginx/crm.webhuis.nl.access.log;
ServerAdmin webmaster@localhost
 
ServerName webmail.webhuis.nl
+
error_log /var/log/nginx/crm.webhuis.nl.error.log;
  +
DocumentRoot /var/www/redirect
 
  +
listen 443;
RewriteEngine on
 
  +
ssl_certificate ssl/crm.webhuis.nl.cert.pem;
RewriteCond %{SERVER_PORT} !^443$
 
  +
ssl_certificate_key ssl/crm.webhuis.nl.key-nopw.pem;
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [NC,R,L]
 
  +
RewriteLog /tmp/rewrite.log
 
  +
ssl_session_timeout 5m;
RewriteLogLevel 9
 
  +
</VirtualHost>
 
  +
ssl_protocols SSLv3 TLSv1;
  +
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
  +
ssl_prefer_server_ciphers on;
  +
  +
ssl_session_cache builtin:1000 shared:SSL:10m;
  +
# Volgende optie nog uittesten, bovenstaande regel heeft het al veel beter gemaakt!
  +
# ssl_session_cache shared:SSL:10m;
  +
  +
location / {
  +
proxy_pass https://crm.webhuis.nl:443;
  +
proxy_redirect off;
  +
  +
#Proxy Settings
  +
proxy_set_header Host $host;
  +
proxy_set_header X-Real-IP $remote_addr;
  +
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  +
proxy_max_temp_file_size 0;
  +
proxy_connect_timeout 90;
  +
proxy_send_timeout 90;
  +
proxy_read_timeout 90;
  +
proxy_buffer_size 32k;
  +
proxy_buffers 4 32k;
  +
proxy_busy_buffers_size 64k;
  +
proxy_temp_file_write_size 64k;
  +
  +
#root /var/www/crm.webhuis.nl;
  +
#index index.html index.htm;
  +
}
  +
}
 
</pre>
 
</pre>
 
<hr/>
 
<hr/>

Revision as of 20:42, 16 August 2012

mutli ssl single IP proxy

De nginx ssl proxy leidt het verkeer naar de secure Apache baclend.

server {
server_name  crm.webhuis.nl;
access_log  /var/log/nginx/crm.webhuis.nl.access.log;
error_log  /var/log/nginx/crm.webhuis.nl.error.log;

listen   443;
ssl_certificate  ssl/crm.webhuis.nl.cert.pem;
ssl_certificate_key  ssl/crm.webhuis.nl.key-nopw.pem;

ssl_session_timeout  5m;

ssl_protocols  SSLv3 TLSv1;
ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
ssl_prefer_server_ciphers   on;

ssl_session_cache  builtin:1000  shared:SSL:10m;
# Volgende optie nog uittesten, bovenstaande regel heeft het al veel beter gemaakt!
# ssl_session_cache    shared:SSL:10m;

location / {
        proxy_pass      https://crm.webhuis.nl:443;
        proxy_redirect  off;

        #Proxy Settings
        proxy_set_header   Host             $host;
        proxy_set_header   X-Real-IP        $remote_addr;
        proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
        proxy_max_temp_file_size 0;
        proxy_connect_timeout      90;
        proxy_send_timeout         90;
        proxy_read_timeout         90;
        proxy_buffer_size          32k;
        proxy_buffers              4 32k;
        proxy_busy_buffers_size    64k;
        proxy_temp_file_write_size 64k;

#root   /var/www/crm.webhuis.nl;
#index  index.html index.htm;
}
}

Terug naar: Webhuis configuratie