Welcome! Log In Create A New Profile

Advanced

How to allow https on Nginx Proxy?

Posted by hdavy2002 
How to allow https on Nginx Proxy?
December 25, 2012 11:19PM
Hi there,

I am trying to use Nginx as a forward proxy. I am using a pac file for my browser. I can browse all http sites, but when it comes to https. I get timed out.

So temporarily, I am telling my pac file to go to https directly and http to go through the browser. Would appreciate any help. Thanks in advance.

Here is my pac file http://secure.myspark.ai/proxy.pac

and below is nginx.conf

user www-data;
worker_processes 4;
pid /var/run/nginx.pid;

events {
worker_connections 768;
# multi_accept on;
}

http {

# proxy cache config
proxy_cache_path /mnt/nginx_cache levels=1:2
keys_zone=one:10m
inactive=7d max_size=10g;
proxy_cache_path /mnt/nginx_cache_media levels=1:2
keys_zone=MEDIA:10m
inactive=7d max_size=5g;
proxy_temp_path /var/www/nginx_temp;



##
# Basic Settings
##

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /etc/nginx/mime.types;
default_type application/octet-stream;

##
# Logging Settings
##
# configure cache log
log_format cache '***$time_local '
'$upstream_cache_status '
'Cache-Control: $upstream_http_cache_control '
'Expires: $upstream_http_expires '
'$host '
'"$request" ($status) '
'"$http_user_agent" '
'Args: $args '
# 'Media: $media_flag '
;
access_log /var/log/nginx/cache.log cache;


access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
}


And my default looks like this
server {
listen 8888;


proxy_set_header Host $host;
location / {
resolver 208.67.220.220;
proxy_pass http://$http_host$uri$is_args$args;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 123
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready