server { listen 443 ssl; server_name go.goautodial.org go.goautodial.org; access_log on; access_log /var/log/nginx/go.goautodial.org-access_log; error_log /var/log/nginx/go.goautodial.org-error_log debug; location ~* .(gif|jpg|jpeg|png|ico|wmv|3gp|avi|mpg|mpeg|mp4|flv|mp3|mid|js|css|html|htm|wml)$ { if (!-e $request_filename){ rewrite ^(.*)$ /index.php break; } root /var/www/html; expires 365d; } location /RECORDINGS { root /var/spool/asterisk/monitorDONE; } location /recordings { root /var/spool/asterisk/monitorDONE; } ssl on; ssl_certificate /etc/pki/tls/certs/localhost.crt; ssl_certificate_key /etc/pki/tls/private/localhost.key; ssl_session_timeout 5m; ssl_protocols SSLv3 TLSv1; ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+EXP; ssl_prefer_server_ciphers on; location / { index index.html index.htm index.php; client_max_body_size 10m; client_body_buffer_size 128k; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 128k; proxy_buffers 4 256k; proxy_busy_buffers_size 256k; proxy_temp_file_write_size 256k; proxy_connect_timeout 30s; proxy_redirect https://go.goautodial.org:444 https://go.goautodial.org; proxy_redirect https://www.go.goautodial.org:444 https://www.go.goautodial.org; proxy_pass https://127.0.0.1:444/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location /agent/ { index agent.php; # root /var/www/html/agent; #rewrite /agent(.*) $1 break; proxy_pass https://127.0.0.1:444/agent/; #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; } }