Install the app
How to install the app on iOS

Follow along with the video below to see how to install our site as a web app on your home screen.

Note: This feature may not be available in some browsers.

Hosting a WordPress website

As an Amazon Associate, we may earn commissions from qualifying purchases. Learn more...

Simply in your reverse proxy host for that php.mydomain.com just redirect it to your wp container.
Ok, sorry, now I understood.
I changed destination Port to 32789 in the reverse proxy of php.mydomain.com.
Now visiting http://php.mydomain.com I still get ERR_CONNECTION_TIMED_OUT and in the url bar appears php.mydomain.com:32789
 
That's a pretty generic error code. Best to try and access your site and open up the Web Developer (network monitoring) tools so we can see what's going on when you try and access that site. It will show what and where errors out with a proper code.

Depending on your browser of choice this will be under the Web Inspector name or something similar to that.
 
I tried to inspect network using Firefox, this is what I got:
inspect.webp


I just substituted mydomain.com to the domain. Should I inspect additional information?
 
Update: I connected to the wordpress database via phpmyadmin and manually set the website url and the home url to MyDomain.com and now I am able to reach the website at this url.

I tried then to add a reverse proxy to Port 443 from the https Port I defined in the wordpress container, in order to reach the website at MyDomain.com but this is still not working (I obtain Synology page with "Sorry, the page you are looking for is not found.").

Should I set the website url with the https and then follow the tutorial for redirecting http to https?
 
this is still not working (I obtain Synology page with "Sorry, the page you are looking for is not found.").
Again rp problem by the looks of it.

Should I set the website url with the https and then follow the tutorial for redirecting http to https?
It should work without redirect if you are targeting https directly.

I would suggest you redo the whole wp setup again with a fresh db. Obviously there is nothing wrong with your RP setup in general so there must be something with that wp causing all these problems.
 
Ok thank you, I will try to setup wordpress again using Port 443 and https url.

Anyway, I think that the problem is not only related to that wordpress installation. In fact, I have a reverse proxy correctly working on Port 80 for phpmyadmin container, I reach it at http://php.mydomain.com. Then, I add to that container a binding to Port 443, I create the reverse proxy rule for Port 443 but when I try to reach phpmyadmin at https://php.mydomain.com I always get the same error "Sorry, the page you are looking for is not found."
 
Without reinstalling wordpress, I succeeded in reaching the url https://www.mydomain.com!
I had to set up a reverse proxy with the same destination Port used in the http case.
Even for https://php.mydomain.com I needed to set up as destination port the one associated to Port 80 in the container, with http protocol.

At this point I only need to solve these two issues:
- redirecting automatically http to https (@Rusty, in your tutorial web station is used, do I need it in my case? Or I just need to modify the .htaccess in the html folder of wordpress?)
- redirecting mydomain.com (without www) to the website. Even this should be done modifying .htaccess file?
 
redirecting mydomain.com (without www) to the website. Even this should be done modifying .htaccess file?
Didn’t follow this thread (I don’t know anything about Wordpress), but I’m glad you got it working :)

For the above, the way I did it is point the A record to mydomain.com then I created a CNAME with www to catch those who type www.mydomain.com.
www is a subdomain.
 
Thanks @WST16.
I already have an A record pointing from my domain to my static public IP address, and a CNAME record pointing from www to my domain.
Maybe I need to set the Reverse Proxy to mydomain.com instead of www.mydomain.com?
 
Or I just need to modify the .htaccess in the html folder of wordpress?)
- redirecting mydomain.com (without www) to the website. Even this should be done modifying .htaccess file?
Correct you can do that for your specific case with htaccess file.

HTTP-HTTPS redirect can also be solved with a reverse proxy that allows that but the built-in version of Nginx with Syno does not solve that (even they do have the checkbox for HSTS for host records).

Maybe you will have more success with a different reverse proxy solution like: blackvoid - NGINX proxy manager
 
Thanks @WST16.
I already have an A record pointing from my domain to my static public IP address, and a CNAME record pointing from www to my domain.
Maybe I need to set the Reverse Proxy to mydomain.com instead of www.mydomain.com?
Just wanted to point out that www is a subdomain (and can be under a CNAME). However, if this is the way you've done it then there might be something to be configured within Wordpress. So you better follow @Rusty recommendations.
 
After tons of tentatives, I finally did it!
I decided not to set up NGINX proxy manager and to obtain the redirect by modifying the .htaccess file.

For whom may need it, this is the code:
Code:
<IfModule mod_rewrite.c>

RewriteEngine On

# ensure www
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# ensure https
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

</IfModule>

Even like this only redirect from http to https was actually working, non-www to www was still not.
I needed to add other 2 Reverse Proxy rules to fix it, with source http://mydomain.com and https://mydomain.com, destination for both http://nasip:32789.

Not elegant at all, but it works!

Thank you again @Rusty and @WST16 for the help!
 
Even like this only redirect from http to https was actually working, non-www to www was still not.
Why do you want to direct non-www to www (do you want to redirect mydomain.com to www.mydomain.com?). Usually the other way round is enough (as it’s working with you now). I’m sure I’m missing the point.
 
Why do you want to direct non-www to www (do you want to redirect mydomain.com to www.mydomain.com?). Usually the other way round is enough (as it’s working with you now). I’m sure I’m missing the point.
I just decided to have www.mydomain.com as canonical domain name.
The need of having a redirect, is that without it if someone writes in the browser mydomain.com the website is not reached.
My aim is to have http://mydomain.com, https://mydomain.com and http://www.mydomain.com all redirecting to https://www.mydomain.com.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Popular tags from this forum

Similar threads

Thread Tags

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending content in this forum

Back
Top