V
V
Vitaly2018-06-19 12:36:12
Nginx
Vitaly, 2018-06-19 12:36:12

How to properly set up a local cache server on nginx?

All the best!
I'm trying to solve the problem of slow access to some resources by using a local proxy server.
But that’s what he can’t write the config correctly (I didn’t particularly come across nginx), when I check with the nginx -t command, I get an error:

nginx: [emerg] https protocol requires SSL support in /usr/local/nginx/conf/nginx.conf:14
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed

here is my nginx.conf :
events {
    worker_connections  1024;
}


http {
    proxy_cache_path /var/cache/nginx_cache levels=1:2 keys_zone=all:32m max_size=2g;

    server {
        listen       80;
        server_name  localhost;

        location / {
            proxy_pass https://some.site.com;
            proxy_cache all;

        }
    }
}

Actually error in proxy_pass https://some.site.com; ....
Please tell me how to write the config correctly?
P.S. in order to then reach the site https://some.site.com; Do you need to enter the address localhost in the browser or just specify the proxy server in your localhost in the browser settings ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2018-06-19
@Tabletko

You write proxy_pass https://some.site.com , but the above section is only about http 80

I
Ivan, 2018-06-19
@LiguidCool

Here is IMHO:
profit.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question