개발자의 노트
Nginx gzip 압축 적용
소프트웨어개발/Nginx 2014. 2. 27. 20:03

nginx.conf 에 gzip 설정 추가 http { ...... # Gzip Settings gzip on; #gzip_static on; gzip_disable "MSIE [1-6]\.(?!.*SV1)"; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_min_length 512; gzip_buffers 16 8k; gzip_http_version 1.1; gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/x-javascript application/json application/xml application..

Nginx 설정 예제 (nginx.conf)
소프트웨어개발/Nginx 2014. 2. 27. 16:34

참고용 (gzip, minify js/css, robots.txt 등등) # yum install perl-devel perl-ExtUtils-Embed # yum install cpan # cpan JavaScript::Minifier::XS # cpan CSS::Minifier::XS nginx 설치시 --with-http_perl_module 포함 # ./configure --prefix=/usr/local/nginx \ > --sbin-path=/usr/local/nginx/sbin/nginx \ > --conf-path=/usr/local/nginx/conf/nginx.conf \ > --pid-path=/log/nginx/nginx.pid \ > --error-log-path=/log/ngin..

nginx 에서 ssl 적용하기
소프트웨어개발/Nginx 2012. 11. 5. 14:14

tomcat + nginx 연동하기에서 nginx를 설치했었다. OpenSSL을 이용해 Self-Signed SSL 인증서 만들기에서 자체 서명된 인증서를 생성했다. 이제, nginx에서 ssl를 적용해보자. # cd /usr/local/nginx # vi conf/nginx.conf 아랫부분에 # HTTPS server 섹션을 찾아서 주석을 풀고 수정을 한다. # HTTPS server # server { listen 443; server_name localhost; ssl on; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; ssl_certificate /usr/local/ssl/www.xxxx.co.kr.crt; ssl_certificat..

tomcat + nginx 연동하기
소프트웨어개발/Nginx 2012. 11. 5. 13:35

먼저 tomcat (http://tomcat.apache.org/) 을 설치하자. 톰캣 7버전을 다운로드 후 압축 해제 # cd /usr/local/src # wget http://apache.tt.co.kr/tomcat/tomcat-7/v7.0.27/bin/apache-tomcat-7.0.27.tar.gz # tar zxvf apache-tomcat-7.0.27.tar.gz # cp -Rf apache-tomcat-7.0.27 /usr/local/tomcat # cd /usr/local/tomcat/ # ll total 116 drwxr-xr-x 2 root root 4096 Jun 19 07:44 bin drwxr-xr-x 2 root root 4096 Jun 19 07:44 conf drwxr-xr..