Showing posts with label nginx. Show all posts
Showing posts with label nginx. Show all posts

Sunday, April 22, 2012

Nginx TLS SNI Enabled

source: http://www.falsyana.com/2011/linux/multiple-ssl-sites-on-1-ip-nginx/

Chrome OK:

Mozilla OK:

IE9 Not OK:


nginx -V
nginx version: nginx/1.0.12
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-52)
TLS SNI support enabled

Sunday, May 15, 2011

faster than original cpanel

i use nginx as cpanel wrapper.

server {
error_log /var/log/nginx/vhost-error_log warn;
# Use alternative port eg: port 2073
listen _PUBLIC_IP_:2073;

ssl on;


# redirect error page ssl
# this prevent nginx error 400 http://nginx.org/pipermail/nginx/2009-August/014521.html

error_page 497 https://$host$request_uri;

#ssl on; this can be turned off since the above will automatically enable it
ssl_certificate /etc/ssl/certs/domain.pem;
ssl_certificate_key /etc/ssl/private/domain.key;

server_name domain.com www.domain.com;
access_log /usr/local/apache/domlogs/domain.com-bytes_log bytes_log;
access_log /usr/local/apache/domlogs/domain.com combined;
root /home/smartcha/public_html;
location / {
location ~.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|html|htm|txt|js|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso)$ {
expires 7d;
try_files $uri @backend;
#try_files $uri @redirSSL;
}
error_page 405 = @backend;

add_header X-Cache "HIT from Backend";
proxy_pass https://_PUBLIC_IP_:2083;
include proxy.inc;
}
#try n error by apis
#location @redirSSL {
#proxy_connect_timeout 15;
#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-Forwarded-Proto https;
#}
location @backend {
internal;
proxy_pass https://_PUBLIC_IP_:2083;
include proxy.inc;
proxy_set_header X-Forwarded-Proto https;
}
location ~ .*\.(php|jsp|cgi|pl|py)?$ {
proxy_pass https://_PUBLIC_IP_:2083;
include proxy.inc;
}
location ~ /\.ht {
deny all;
}
}

now you can access http://domain.com:2073

Thursday, May 05, 2011

nginx pid error (using nginxcp)

pid      /var/run/nginx.pid;

error:
fopen `/var/run/nginx.pid': No such file or directory [ ok ]

reference: http://bugs.alpinelinux.org/issues/559

vi /etc/nginx/nginx.conf

add

pid /var/run/nginx.pid;

between worker process and error log line.

kill previous nginx process

now you can use:

service nginx restart
success!!

alternative ./configure --pid-path=/var/run/nginx.pid

Saturday, April 16, 2011

nginx made me happy

no more incomplete page. fast loading, stable and very enjoy made me want to lompat lompat.

mysql load also reduced.

Friday, April 15, 2011

nginxcp made easy

for all cpanel administrators i recomend using nginx.

yesterday, new release was found.

Nginx Admin (Stable version) v2.3 released

this is using newest nginx 10
read more http://nginxcp.com/forums/Thread-nginx-admin-stableversion-v2-3-released

don't forget to visit main website http://nginxcp.com/

now i'm using nginx and very happy on performance and there are nginx control panel in whm >> plugin too.. :)
Related Posts Plugin for WordPress, Blogger...