Nginx redirect for /photo

Questions about HTTP Access/Mods may go here
Forum rules
We've moved! Head over to Synology Community (community.synology.com) to meet up with our team and other Synology enthusiasts!
Asathor
I'm New!
I'm New!
Posts: 1
Joined: Wed Sep 19, 2018 11:39 am

Nginx redirect for /photo

Unread post by Asathor » Wed Sep 19, 2018 11:48 am

Hi, I wanted to replace Apache with nginx. For the PhotoStation, I have a redirect for a certain subdomain: sub.domain.com to sub.domain.com/ The redirect with htaccess works fine. Now I wanted to configure this in nginx.
In /usr/syno/share/nginx/WWWService.mustache I added this code block

Code: Select all

server {
listen 443;
server_name sub.domain.com

location = / {
return 301 https://sub.domain.com/photo;
}
}
Unfortunately I get Error 404 on entering sub.domain.com
Instead of the return I also tried rewrite / /photo; Same result.

Anyone knows whats the issue?

Locked

Return to “HTTP/Apache Mods”