Search Results

Search found 4 results on 1 pages for 'larryzhao'.

Page 1/1 | 1 

  • Squid SSL transparent proxy - SSL_connect:error in SSLv2/v3 read server hello A

    - by larryzhao
    I am trying to setup a SSL proxy for one of my internal servers to visit https://www.googleapis.com using Squid, to make my Rails application on that server to reach googleapis.com via the proxy. I am new to this, so my approach is to setup a SSL transparent proxy with Squid. I build Squid 3.3 on Ubuntu 12.04, generated a pair of ssl key and crt, and configure squid like this: http_port 443 transparent cert=/home/larry/ssl/server.csr key=/home/larry/ssl/server.key And leaves almost all other configurations default. The authorization of the dir that holds key/crt is drwxrwxr-x 2 proxy proxy 4096 Oct 17 15:45 ssl Back on my dev laptop, I put <proxy-server-ip> www.googleapis.com in my /etc/hosts to make the call goes to my proxy server. But when I try it in my rails application, I got: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol And I also tried with openssl in cli: openssl s_client -state -nbio -connect www.googleapis.com:443 2>&1 | grep "^SSL" SSL_connect:before/connect initialization SSL_connect:SSLv2/v3 write client hello A SSL_connect:error in SSLv2/v3 read server hello A SSL_connect:error in SSLv2/v3 read server hello A Where did I do wrong?

    Read the article

  • Nginx, as reverse proxy, could not proxy_pass to a domain pointing to the local JBOSS

    - by larryzhao
    My environment is Ubuntu 12.04, Nginx 1.20, and Torquebox 2.0.3 which is actually JBoss AS 7. I have two app deployed on Torquebox, it listens to 8080 and have different hostnames, app1.mydomain.com and app2.mydomain.com. I added 127.0.0.1 app1.mydomain.com and 127.0.0.1 app2.mydomain.com in /etc/hosts then I curl app1.mydomain.com:8080 and curl app2.mydomain.com:8080 both have correct return. Then I go to my nginx. I would like nginx to pass the visit to www.app1.com to app1.mydomain.com:8080, so I have the following configuration: # primary server - proxypass to torquebox server { listen 80; server_name www.app1.com; access_log off; error_log off; # proxy to Torquebox location / { proxy_pass http://app1.mydomain:8080/; 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_max_temp_file_size 0; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; proxy_temp_file_write_size 64k; } } But it doesn't work. curl www.app1.com returns nothing. And if I visit www.app1.com in Safari, the http return code is 404. I don't know why, need help.

    Read the article

  • How to make nginx only respond to one domain?

    - by larryzhao
    I am pretty new to nginx, I host my rails application on nginx+passenger. I want my website to be accessible to only one domain. So I set my nginx conf like the following: server { listen 80; server_name mydomain.com www.mydomain.com; root /var/deploy/myapp/current/public; passenger_enabled on; location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires 1y; add_header Cache-Control public; } } I specify the server_name directive, but still, it answers anything which points to this IP and I could see that in the access.log that it answers to other domain names. Is there anything I am doing wrong?

    Read the article

  • strange doctrine update problem

    - by larryzhao
    Hi, guys, I have a simple table like following: class SnookerCurrentInfo extends Doctrine_Record { public function setTableDefinition() { $this->hasColumn('current_frame_id', 'integer', 4, array('notnull' => 'false')); $this->hasColumn('current_player_id', 'integer', 4, array('notnull' => 'false')); $this->hasColumn('current_score1', 'integer', 4, array('notnull' => 'false')); $this->hasColumn('current_score2', 'integer', 4, array('notnull' => 'false')); } public function setUp(){ $this->setTableName('snooker_current_info'); } } and I would like to keep only one entry in this table. So every time the value is changed I read the entry with id = 1 out and change the object and execute save. like the following: $info = Doctrine::getTable('SnookerCurrentInfo')->find(1); $info->current_frame_id = $jsonInfo['current_frame_id']; $info->current_player_id = $jsonInfo['current_player_id']; $info->current_score1 = $jsonInfo['current_score1']; $info->current_score2 = $jsonInfo['current_score2']; $info->save(); but the strange thing is, I try to make it clear. Let's say at first, the entry is (30, 1, 1, 0) and I switch player, so update the entry to (30, 2, 1, 0). and I switch the player back again, so the entry should be updated to (30, 1, 1, 0), but this is not affected to the database!! In the database, the entry still remains as (30, 2, 1, 0)!!!! But if after (30, 2, 1, 0), I update the score to (30, 2, 1, 1) and then switch the player back (30, 1, 1, 1) then this is ok. What's that? How should I deal with it? Thanks for a lot helping, really urgent!!

    Read the article

1