Joomla-Redirects + nginx + PHP-FPM

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Post Reply
Firewall
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Wed Feb 13, 2019 11:52 am

Joomla-Redirects + nginx + PHP-FPM

Post by Firewall » Sat Jun 29, 2019 10:18 am

Hello!

I am using : Joomla 3.9.8
nginx : latest



I have some bad problems with ".php-handlings" of my webserver.
This is more a nginx attitude, but maybe someone had the same problem with his joomla-install.

i CAN set working redirects like:

Expired URL : .....//mydomain.org/oldexample1/
New URL : .....//mydomain.org/newexample1/

This works.
But

Expired URL : ....mydomain.org/oldexample.php
New URL : ....mydomain.org/newexample1/

Doesn't work.

Reason : 404 oder file not found.

My Webserver does something with .php .

My virtual conf looks like this :

server {
listen xx.xx.xx.xx:80;
server_name exampleweb.org www.exampleweb.org;
include /etc/nginx/acme.conf;
access_log /var/log/access.log combined;
root /var/.........de/;



location / {
index index.php index.html index.htm;
#old# try_files $uri $uri/ @rewrites;
try_files $uri $uri/ /index.php?$args;
}

location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
return 403;
error_page 403 /403_error.html;
}


location @rewrites {
rewrite ^ /index.php last;
}

location ~ ^(.+?\.php)(/.*)?$ {
try_files /2f9b4a641b1d5aa9afc426cf486a56b6.htm @php;


}

location @php {
try_files $1 = 404;

include /etc/nginx/fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)\$;
fastcgi_param SCRIPT_FILENAME $document_root$1;
fastcgi_param PATH_INFO $2;
fastcgi_pass unix:/var/run/1-censored.php-fpm.socket;
fastcgi_index index.php;
}


The root-idea was to change the joomlasuffix vom htm to .php .
So mywebsite.org/whatever.php

Post Reply

Return to “Administration Joomla! 3.x”