Tema: Nginx i SSL
Pogledajte određenu poruku
Staro 18. 10. 2010.   #3
squirll
Wait, What?
Qualified
 
Datum učlanjenja: 21.03.2010
Poruke: 148
Hvala: 8
188 "Hvala" u 14 poruka
squirll is on a distinguished roadsquirll is on a distinguished road
Default

jest vala zaboravio sam...

Kôd:
user  nobody;
worker_processes  2;

#error_log  logs/error.log;
#error_log  /var/log/nginx.log warn;
error_log  /var/log/nginx.log  info;

pid /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;
server_names_hash_max_size 2048;
 types_hash_bucket_size 1024;
#  include    mime.types;
# 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  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
    gzip  on;
    gzip_comp_level 3;
    gzip_types application/x-javascript text/plain application/xml text/css;

     server {
        listen       80;
       server_name  localhost;
 
        #charset koi8-r;
        #access_log  logs/host.access.log  main;

         root   /www/default/http_root;

        location / {
          root   /www/default/http_root;
           index  index.html index.htm;
     }

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
	
        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
        #    root           html;
            fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi.conf;
	    fastcgi_param HTTPS on;
        }

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }

include vhosts/*.conf;

    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}


    # HTTPS server
    
    server {
	add_header Cache-Control public;
	expires 90d;
	#index index.php; 
        listen     443 default ssl;
        server_name www.sajt.com;

        ssl                  on;
        ssl_certificate      /root/asset.crt;
        ssl_certificate_key  /root/asset.key;
        ssl_session_timeout  5m;
        ssl_protocols TLSv1;  #SSLv2 SSLv3 TLSv1;
        ssl_ciphers HIGH:!ADH:!MD5;  #ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
	#ssl_prefer_server_ciphers   on; 
	ssl_session_cache shared:SSL:1m;
        location / {
        # proxy_pass http://www.sajt.com; 
	 root   /www/sajt/http_root/;
	 index index.php;
        # include /etc/nginx/proxy.conf;
	# proxy_redirect on;
	# proxy_Set_header Host $host;
        }
    }

}
squirll je offline   Odgovorite uz citat