I’m not sure what’s wrong… (After much troubleshooting) I was able to serve and deploy my droplet without errors, however if i visit the ip I just get nginx welcome page. I sshed to have a looksee at the results and all files look to be exactly where they should. Is there a “final step” I’m missing, or anything blatantly wrong I could be doing?
I found reference about restarting php service but it doesn’t help. I also tried destroying and rebuilding my droplet but I always get the same results…
Any help would be much appreciated
One thing I could easily notice (luckily) is that Trellis pretends to deploy a repo commit that is not actually head. I found out because I moved a file out of the site folder and I can still see it there in the current deploy, after destroying and recreating my droplet. I double checked I set my
group_vars/staging/wordpress_sites.yml branch to staging, which is correct, and checked that branch locally as well.
Did you set up your site as the IP? Site URL, name, etc. ?
I did set it up as ip at first. Now I’m using a name…
I did everything three times… changed repo and rebuilt droplets. Everything is served and deployed just fine. I also sshed in
/etc/nginx/sites-available to check my site
.conf and looks pretty good. Does enabling ssl make a difference?
Yep, apparently there lies the issue. I disabled ssl from
wordpress_sites.yml and now the server points where it’s supposed to.
However a new issue arises now, as it seems wordpress-setup tasks didn’t fire correctly (the famous 5min installation page shows up. I guess it shouldn’t). By reviewing terminal output
everything looks fine, so it’s difficult to understand why ssl and wordpress-setup are having troubles I see the following tasks skipped:
- TASK: [wordpress-setup | Copy database dump]
- TASK: [wordpress-setup | Import database]
Also those related to SSL certificates skipped, but I guess it’s correct since I disabled ssl at the moment.
Any idea why those wordpress-setup tasks skipped?
My real bad For no reason whatsoever I thought the process would be full automatic, but it’s not. I used wp cli to export a copy of the database and used
db_import set to
path/to/file relative to trellis folder within
wordpress_sites.yml. Now back to the issue with ssl.
As of today still have no luck with SSL, although everything seems set up correctly. Both
certificate.key are copied on the server inside
/etc/nginx/ssl/ folder, but http protocol still applies, and https doesn’t work. I couldn’t find conversations about how to test against ssl. Any hints please?
Alright, got it working! Of course it was my fault as for some reason my
server.key did not match.
I was able to find out the issue by checking in terminal if both my certificate and key matched. If they don’t it won’t work. So if you run into a similar issue, try typing the following commands and then compare output hashes:
openssl x509 -noout -modulus -in path/to/certificate.crt | openssl md5
openssl rsa -noout -modulus -in path/to/privateKey.key | openssl md5
Not an ansible guru here, but wondering if possible to include a similar check within roles.