staticfilecache icon indicating copy to clipboard operation
staticfilecache copied to clipboard

nginx & apache with proxy_pass always delivers the same page (index)

Open JLNNN opened this issue 4 years ago • 0 comments

Bug Report

Current Behavior nginx & apache with proxy_pass always delivers the same page (index)

Expected behavior/output I want to see the content of the pages that I navigate to.

Environment

  • TYPO3 version(s): 9.5.26
  • staticfilecache version: 11.1.7
  • Is your TYPO3 installation set up with Composer (Composer Mode): yes
  • OS: not relevant (doesn't matter if os x, windows or debian)

Additional context My nginx is listening to port 80 and forwards requests internally with proxy_pass to port 4433, which response is handled via apache. I applied both settings, nginx and apache .htaccess rules. (On projects where I did only use apache, everything is working fine.)

I realized some port settings within the .htaccess file and IdentifierBuilder.php - hard coded 80 and 443. I tried editing these but it didn't work out.

I tried also setting

	location / {
		try_files $uri $uri/ /index.php @sfc;
	}

in nginx config and that worked, but all cached pages where then double encoded. Removing text/html in mod_deflate (.htaccess) didn't work.

Thank you so far for this great plugin!

This is my complete location setting in nginx config:
	location / {
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header X-Forwarded-For $remote_addr;
		proxy_set_header Host $host;
		proxy_set_header X-Request-URI $request_uri;
		proxy_redirect off;
		proxy_pass https://127.0.0.1:4433;
		try_files $uri $uri/ @sfc;
	}

JLNNN avatar Aug 16 '21 21:08 JLNNN