Closed Kikobeats closed 8 years ago
Did you try it?
nginx: [warn] server name "www.zombeats.es/*" has suspicious symbols in /home/dokku/zombeatsblog/nginx.conf:89
nginx: [warn] server name "www.zombeats.es/*" has suspicious symbols in /home/dokku/zombeatsblog/nginx.conf:95
nginx: [emerg] invalid server name or wildcard "www.zombeats.es/*" on [::]:80
nginx: configuration file /etc/nginx/nginx.conf test failed
maybe is possible to setup but I don't know the correct nginx template for to this.
And now mi redirects is buggy
dokku redirect:unset zombeatsblog www.zombeats.es/*
-----> Unsetting redirect for zombeatsblog...
sed: -e expression #1, char 19: unknown command: `*'
xD
You'll want to remove it from your /home/dokku/APP/REDIRECTS
file manually.
You probably wanted:
dokku redirect:set my-app www.zombeats.es zombeats.es
I'm checkin this: http://stackoverflow.com/a/7958540
for do a ww to non-www redirect maybe we can edit the template for add this special case:
server {
listen 80;
server_name www.domain.com;
# $scheme will get the http protocol
# and 301 is best practice for tablet, phone, desktop and seo
return 301 $scheme://domain.com$request_uri;
}
Did you try my suggestion?
yay better now, thanks!
@josegonzalez finally don't possible make a total URL redirect, that was my real intention, sorry. Check how to www non redirect to non-www.
I'm sure that If I edit the nginx template manually probably yes, but it's created in each build, right? Can I do something for fix it?
I don't understand how what your suggestion is different from what we are currently doing?
As you say in the documentation:
This plugin only redirects one domain to another and does not handle complete URLs.
so, this works:
$ http-traceroute https://www.zombeats.es
[200] HEAD https://zombeats.es (284 ms)
Trace finished in 285 ms using 0 hop
but this doesn't work:
$ http-traceroute https://www.zombeats.es/hola-2016-anunciamos-zombeats-blog-y-mas-sorpresas/
[404] HEAD https://zombeats.es/hola-2016-anunciamos-zombeats-blog-y-mas-sorpresas (270 ms)
Trace finished in 271 ms using 0 hop
so, based in the nginx template, is possible to handle URL Redirect?
It already does. Are you sure that content exists on your app?
Hmmm looks that something is bad in my DNS settings.
My domain for the dokku installation is sailorjs.org
when I enter in the subdomain for the zombeats app, https://zombeatsblog.sailorjs.org/ show another app endpoint.
Any idea about that?
That domain you are now referring to is zombeatsblog
, not zombeats
. Are you sure you configured the right app?
Yes, sorry. The point that I'm trying to fix is that something is wrong in my configuration.
I have two apps: zombeatsblog and kikoblog.
But looks that the subdomains url points to the same app! https://kikoblog.sailorjs.org https://zombeatsblog.sailorjs.org/
but domains associated with the apps looks that works fine: https://kikobeats.com https://zombeats.es
but not the www redirect! https://www.zombeats.es :-(
Any idea how to fix it?
Can you list the domains you've specified for each application? Both with dokku-redirect and the domains plugin.
root@ubuntu-1gb-lon1-01:/var/log/nginx# dokku domains kikoblog
=====> kikoblog Domain Names
kikobeats.com
www.kikobeats.com
kikoblog.sailorjs.org
root@ubuntu-1gb-lon1-01:/var/log/nginx# dokku domains zombeatsblog
=====> zombeatsblog Domain Names
zombeatsblog.sailorjs.org
zombeats.es
www.zombeats.es
root@ubuntu-1gb-lon1-01:/var/log/nginx# dokku redirect zombeatsblog
SOURCE DESTINATION
www.zombeats.es zombeats.es
root@ubuntu-1gb-lon1-01:/var/log/nginx# dokku redirect kikoblog
! There are no redirects for kikoblog
The redirect looks like it works fine.
Are you trying to have duplicate content with those sailorjs domains?
is it possible?
Maybe make possible configure something like: