Welcome! Log In Create A New Profile


Automatischer Redirect nach Trailing Slash

Posted by maze-m 
Automatischer Redirect nach Trailing Slash
May 02, 2022 04:12PM
Hallo zusammen!

Ich habe einen Webserver von Apache nach Nginx migriert und nun leider das Problem, dass ein Redirect nach Trailing Slash beim Aufruf eines SVG-Files durchgeführt wird:


[shell]$ curl -iks http://dev-adad-lab.intern.hostname.com/images/firma_logo.svg

HTTP/1.1 301 Moved Permanently

Server: nginx/1.20.1

Date: Thu, 28 Apr 2022 08:22:31 GMT

Content-Type: text/html

Content-Length: 169

Location: http://dev-adad-lab.intern.hostname.com/images/firma_logo.svg/

Connection: keep-alive

Access-Control-Allow-Origin: *


<head><title>301 Moved Permanently</title></head>


<center><h1>301 Moved Permanently</h1></center>





Meine Config von dem vHost ist die Folgende:


server {
server_name dev-adad-lab.intern.hostname.comm;
charset iso-8859-1;

location / {
root /home/database/htdocs;
index index.html index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php56-fpm-dev-adad.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
include fastcgi_params;
auth_basic "Restricted Content";
auth_basic_user_file /home/database/passwort;

location ~* \.(eot|svg|ttf|woff|woff2)$ {
alias /home/database/htdocs/includes;
include /etc/nginx/mime.types;
add_header Access-Control-Allow-Origin *;

location /paper_bills {
alias /home/database/billing/paper_bills;
autoindex on;

access_log /var/log/nginx/dev-adad_access.log;
error_log /var/log/nginx/dev-adad_error.log;


Wie bekomme ich die Config dahingehend angepasst, dass mir die Bilder richtig angezeigt werden?

Edited 1 time(s). Last edit at 05/02/2022 04:13PM by maze-m.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 258
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready