HOME


sh-3ll 1.0
DIR:/proc/thread-self/root/opt/cpguard/app/resources/captcha/
Upload File :
Current File : //proc/thread-self/root/opt/cpguard/app/resources/captcha/ssl.conf
server {

    server_name {{ domains | join(' ') }};

    listen 9097;
    listen [::]:9097;

    root /opt/cpguard/app/api/public/captcha;

    #access_log /opt/cpguard/cpg-nginx/logs/access.log combined;
    #error_log /opt/cpguard/cpg-nginx/logs/error.log error;

    keepalive_timeout 0;
    etag off;

    # Absolute no-cache on captcha
    add_header Cache-Control "no-store, no-cache, must-revalidate, max-age=0" always;
    add_header Pragma "no-cache" always;
    add_header Expires "0" always;

    location / {
        return 301 https://$host$request_uri;
    }
}

server {

    server_name {{ domains | join(' ') }};

    listen 9099 ssl;
    listen [::]:9099 ssl;

    ssl_certificate {{ ssl_cert }};
    ssl_certificate_key {{ ssl_key }};

    #access_log /opt/cpguard/cpg-nginx/logs/access.log combined;
    #error_log /opt/cpguard/cpg-nginx/logs/error.log debug;

    root /opt/cpguard/app/api/public/captcha;

    etag off;
    keepalive_timeout 0;

    # Absolute no-cache on captcha
    add_header Cache-Control "no-store, no-cache, must-revalidate, max-age=0" always;
    add_header Pragma "no-cache" always;
    add_header Expires "0" always;

    location = /altcha.php {
        include fastcgi_params;
        fastcgi_pass unix:/opt/cpguard/cpg-php-fpm/var/run/cpgphp-cgi.sock;
        fastcgi_index altcha.php;
        fastcgi_param SCRIPT_FILENAME $document_root/altcha.php;
    }

    # This saves bandwidth. Nginx simply hangs up on them.
    location ~* \.(jpg|jpeg|gif|png|bmp|webp|ico|svg|tiff|css|js|woff|woff2|ttf|eot|map|json|pdf|doc|docx|xls|xlsx|ppt|pptx|txt|rtf|zip|rar|7z|tar|gz|bz2|iso|mp3|mp4|avi|mov|mpeg|flv|wav|ogg)$ {
        return 444;
    }

    location / {
        rewrite ^ /https.html break;
    }

}