Hey all,
as of trying to tune a little on a small ILIAS 6.4 installation i ran across some issues with redirects in combination with Nginx as webserver.
Maybe i'm completely lost and forgot about how to "webserv" or it is the combination of those. Issue is too many redirects (19 in total) while accessing login page of ILIAS.
For more details:
- Nginx throws 301 (permanantly moved) and afterwards ilias goes with 302 for about 18 times.
Regarding config of Nginx for Ilias:
server {
server_name ilias.domain.tld ilias.domain2.tld;
root /var/www/ilias;
index index.php;
access_log /var/log/nginx/ilias.access.log;
error_log /var/log/nginx/ilias.error.log;
client_max_body_size 100M;
autoindex off;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
include fastcgi_params;
fastcgi_intercept_errors on;
}
listen [::]:443 ssl;
listen 443 ssl;
ssl_certificate /.../fullchain.pem;
ssl_certificate_key /.../privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}
For the HTTP redirect i use a simple statement:
server {
if ($host = ilias.domain.tld) {
return 301 https://$host$request_uri;
}
if ($host = ilias.domain2.tld) {
return 301 https://$host$request_uri;
}
listen 80 ;
listen [::]:80 ;
server_name ilias.domain.tld ilias.domain2.tld;
return 301 https://ilias.domain.tld;
}
As i got HTTPS handling in ILIAS administration disabled i'm quite stuck on where the 302-reroutes come from.
Maybe some got an idea?
Thanks in advance!
Benj
as of trying to tune a little on a small ILIAS 6.4 installation i ran across some issues with redirects in combination with Nginx as webserver.
Maybe i'm completely lost and forgot about how to "webserv" or it is the combination of those. Issue is too many redirects (19 in total) while accessing login page of ILIAS.
For more details:
- Nginx throws 301 (permanantly moved) and afterwards ilias goes with 302 for about 18 times.
Regarding config of Nginx for Ilias:
server {
server_name ilias.domain.tld ilias.domain2.tld;
root /var/www/ilias;
index index.php;
access_log /var/log/nginx/ilias.access.log;
error_log /var/log/nginx/ilias.error.log;
client_max_body_size 100M;
autoindex off;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
include fastcgi_params;
fastcgi_intercept_errors on;
}
listen [::]:443 ssl;
listen 443 ssl;
ssl_certificate /.../fullchain.pem;
ssl_certificate_key /.../privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}
For the HTTP redirect i use a simple statement:
server {
if ($host = ilias.domain.tld) {
return 301 https://$host$request_uri;
}
if ($host = ilias.domain2.tld) {
return 301 https://$host$request_uri;
}
listen 80 ;
listen [::]:80 ;
server_name ilias.domain.tld ilias.domain2.tld;
return 301 https://ilias.domain.tld;
}
As i got HTTPS handling in ILIAS administration disabled i'm quite stuck on where the 302-reroutes come from.
Maybe some got an idea?
Thanks in advance!
Benj