CAS Tomcat behind NGINX website site display is slow

25 views
Skip to first unread message

Baba Ndiaye

unread,
Dec 21, 2021, 3:15:45 AM12/21/21
to CAS Community
Hello
I have set up an authentication with CAS and LDAP it works fine. To hide (make a redirection) the http://moncas.test:8080/cas by https://moncas.test it also works but the website takes a long time before display (50 seconds or more). I am using Tomcat9 and nginx CAS 6.4.4. I would need some advices or recommendations.

Baba Ndiaye

unread,
Dec 21, 2021, 3:20:18 AM12/21/21
to CAS Community, Baba Ndiaye
it's my vhost config  
upstream tomcat {
    server localhost:8080;
}


server {
    listen 80;
##    listen [::]:80;
    server_name cas.monsite;
    return 301 https://cas.monsite$request_uri;
}

server {


    listen 443 ssl;
###    listen [::]:443 ssl;
    server_name cas.monsite;
    access_log /var/log/nginx/tomcat-access.log;
    error_log /var/log/nginx/tomcat-error.log;

    ssl_certificate /etc/nginx/ssl/cas.cer;
    ssl_certificate_key /etc/nginx/ssl/cas.key;
    ssl_session_cache   shared:SSL:1m;
    ssl_prefer_server_ciphers on;



    location / {

        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://tomcat;

        rewrite ^/$ /cas last;

        ##proxy_buffer_size          256k;
        ##proxy_buffers              4 512k;
        ##proxy_busy_buffers_size    512k;
  }


location ~ [^/]\.php(/|$) {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
Reply all
Reply to author
Forward
0 new messages