wget
tar -zxvf mongrel-1.1.5.tgz
cd mongrel-1.1.5
ruby setup.rb
cd ..
wget
tar zxvf pcre-8.01.tar.gz
cd pcre-8.01/
./configure
make ;make install
cd ../
wget
tar -zxvf nginx-1.3.0.tar.gz
cd nginx-1.3.0
./configure --user=puppet --group=puppet --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
make &&make install
cd ..
/etc/init.d/puppetmaster stop
vim /etc/sysconfig/puppetmaster
PUPPETMASTER_PORTS=( 18140 18141 18142 18143 )
PUPPETMASTER_EXTRA_OPTS='—servertype=mongrel --ssl_client_header=HTTP_X_SSL_SUBJECT'
/etc/init.d/puppetmaster start
vi /usr/local/nginx/conf/nginx.conf
user puppet puppet;
worker_processes 4;
error_log /usr/local/nginx/logs/nginx_error.log crit;
pid /usr/local/nginx/logs/nginx.pid;
events {
worker_connections 1024;
}
http {
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
# access_log /usr/local/nginx/logs/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
large_client_header_buffers 16 4k;
proxy_buffers 128 4k;
keepalive_timeout 65;
ssl on;
upstream puppet {
server 127.0.0.1:18140;
server 127.0.0.1:18141;
server 127.0.0.1:18142;
server 127.0.0.1:18143;
}
server {
listen 8140;
ssl on;
ssl_session_timeout 5m;
ssl_certificate /var/lib/puppet/ssl/certs/akin.com.pem;
ssl_certificate_key /var/lib/puppet/ssl/private_keys/akin.com.pem;
ssl_client_certificate /var/lib/puppet/ssl/ca/ca_crt.pem;
ssl_ciphers SSLv2:-LOW:-EXPORT:RC4+RSA;
ssl_verify_client optional;
ssl_crl /var/lib/puppet/ssl/ca/ca_crl.pem;
access_log /usr/local/nginx/logs/access.log main;
location / {
proxy_pass ;
proxy_redirect off;
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_set_header X-Client-Verify $ssl_client_verify;
proxy_set_header X-Client-DN $ssl_client_s_dn;
proxy_set_header X-SSL-Subject $ssl_client_s_dn;
proxy_set_header X-SSL-Issuer $ssl_client_i_dn;
proxy_read_timeout 65;
}
}
}
阅读(1212) | 评论(0) | 转发(0) |