Your IP : 10.1.73.149


Current Path : /opt/cpguard/app/setup/common/files/
Upload File :
Current File : //opt/cpguard/app/setup/common/files/cpg-nginx.conf

worker_processes  1;

pid        /opt/cpguard/cpg-nginx/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include             mime.types;
    default_type        application/octet-stream;

    sendfile            on;
    server_tokens off;
    server_names_hash_bucket_size 256;
    server_names_hash_max_size 16384;

    server {
        listen          9098 ssl;
        server_name     HOSTNAME;

        access_log      on;

        ssl_certificate      /opt/cpguard/cpg-nginx/ssl/cpg.pem;
        ssl_certificate_key  /opt/cpguard/cpg-nginx/ssl/cpg.key;

        ssl_session_cache    shared:SSL:1m;
        ssl_session_timeout  5m;

        ssl_ciphers  HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers  on;

        

	    client_max_body_size 2048M;

        location ^~ /api {
            alias /opt/cpguard/app/api/public;
            index index.php;
            try_files $uri $uri/ @api;

            location ~ \.php {
                fastcgi_pass   unix:/opt/cpguard/cpg-php-fpm/var/run/cpgphp-cgi.sock;
                fastcgi_index  index.php;
                fastcgi_param SCRIPT_FILENAME $request_filename;
                include        fastcgi_params;
            }
        }

        location @api {
            rewrite /api/(.*)$ /api/index.php?/$1 last;
        }

        include /opt/cpguard/cpg-nginx/conf/cpgx-*.conf;

        # Final catch-all
        location / {
            return 404;
        }
    }

    #For firewall CAPTCHA
    include /opt/cpguard/cpg-nginx/conf/c*ptcha.conf;
}