0

I have installed nginx with only SSL at http://sub.domain.com with docroot /home/webroot/

Users who login upload files to /home/webroot/uploads/

I want the folder /uploads only to be accessible through HTTP also for external users. The main user interface has to be accessed through HTTPS only.

Please help.

    #
    # The default server
    #
    server {
    listen       443;
        server_name  sub.domain.com;

ssl on;
ssl_certificate /home/keys/sslkey.pem;
ssl_certificate_key /home/keys/server.key;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   /home/webroot;
            index  index.html index.htm index.php;
        }

1 Answers1

1

You need to set up a non-SSL virtual host. You will need to use rewrites so that any request to a location other than "/uploads" will be redirected to the SSL virtual host.

cjc
  • 24,916
  • 3
  • 51
  • 70