Issue:
Attempting to use a CMS stub for the root directory. vBulletin is located in /forums.
Stub works as expected with http, but as soon as I switch to https, error 500 "too_many_redirects" on the CMS stub. The rest of the site is flawless.
Testing environment:
Test site is still available if you'd like a closer look.
vhost
fastcgi-php.conf
phpstuff.conf
I've spent all day trying different types of rewrite URLs and nginx configurations, all with the same result.It could be something to do with cloudflare (I'll test a normal SSL cert today), a bug with vBulletin, or some sort of server config I've missed.
Attempting to use a CMS stub for the root directory. vBulletin is located in /forums.
Stub works as expected with http, but as soon as I switch to https, error 500 "too_many_redirects" on the CMS stub. The rest of the site is flawless.
Testing environment:
- vBulletin 4.2.5 beta 1 (fresh install, no plugins/products/styles)
- Standard options, standard URLs, example CMS.
- Nginx
- PHP 7.0
- Cloudflare's free ssl (default settings)
Test site is still available if you'd like a closer look.
vhost
Code:
server { listen 80; listen [::]:80; listen 443 ssl; listen [::]:443 ssl; root /var/www/redacted; # Add index.php to the list if you are using PHP index index.php index.html index.htm index.nginx-debian.html; server_name www.redacted.com; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { include snippets/fastcgi-php.conf; include snippets/phpstuff.conf; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # location ~ /\.ht { deny all; } }
Code:
# regex to split $uri to $fastcgi_script_name and $fastcgi_path fastcgi_split_path_info ^(.+\.php)(/.+)$; # Check that the PHP script exists before passing it try_files $fastcgi_script_name =404; # Bypass the fact that try_files resets $fastcgi_path_info # see: http://trac.nginx.org/nginx/ticket/321 set $path_info $fastcgi_path_info; fastcgi_param PATH_INFO $path_info; fastcgi_index index.php; include fastcgi.conf;
phpstuff.conf
Code:
# With php7.0-fpm: fastcgi_pass unix:/run/php/php7.0-fpm.sock; fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_intercept_errors on; fastcgi_ignore_client_abort off; fastcgi_connect_timeout 60; fastcgi_send_timeout 180; fastcgi_read_timeout 180; fastcgi_buffers 256 16k; fastcgi_buffer_size 32k; fastcgi_temp_file_write_size 256k;
Comment