-
-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Custom Wordpress Location - Error establishing a database connection #544
Comments
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid. |
Relevant, the nginx conf, didn't have a spot for it in the initial post.
|
I'm not entirely sure what you're crossing container paths with wordpress/swag. If you're using their docker container, just edit the nginx config to point at wordpress:80 address rather than trying to load the files directly. Swag is likely isn't picking up this ENV's because they're not out into a config file that it can read. |
That was the very first thing I did, my wordpress.sudomain(replaced with mydomain).conf I get "welcome to our server"
|
Is wordpress/swag sharing the same docker network? |
It's also worth noting, you're running old nginx configs so might be wise to get those updated. |
Yes
|
I just removed samples and re-created, it's the same version date. |
I mean I'm assuming that copying the wordpress.subdomain.conf would work, replacing the sudomain logic with my own domain. Please tell me if this is a fundamental inconsistency. |
The proxy config is incorrect, subdomain isn't what's needed. Look at our example for Heimdall as root domain, it uses a subfolder conf but you have to adjust it slightly. |
Do I need to update 443 to 80? I changed the name to wordpress, but not sure what else I should do, as I've always use subdomain. I'm sure I have to add my domain somewhere though lol.
|
Yes you need to change those relevant to the wordpress container. |
Ok I did - still get the welcome to our server message. |
On the cert it still shows my domain 1 btw. |
Any other ideas? Still an issue. |
if it's showing the server message, it means something isn't right in your nginx conf as nginx doesn't know what to do with routing it. |
That's why I'm asking for guidance. Not sure where I'm going wrong. I poked around a bit and added my domain to the heimdall config but not really sure what's up at this point
|
Update - I got it working but it's only when I put in my main domain - not my domain that is in other domains. It does however append the :PORT that I mapped at the end of the url. So it's only SWAG_URL that loads - not EXTRA_DOMAINS Here is my current config:
and my default:
I plan on putting up my wife's website as well so I really need to be able to use EXTRA_DOMAINS |
You'll likely need to put a new location specific for that domain using the |
Ok - so the wordpress subfolder sample says to comment out location and php in default, where would I set that up? I've tried adding my domain as another conf file as well. |
Now all my other proxies are broken. Tried to re-create and now it's saying the keys aren't there. They look to be links. Edit, got them back. I'm at a loss here. I've given all my configs and have pretty much only gotten "yeah you have to edit that" but WHAT do I edit? WHAT do I need to do? I've followed the docs before even coming here, tried using the samples per directions with no real guidance, and still right back where I started. |
Is there an existing issue for this?
Current Behavior
Site loads not secure with : Error establishing a database connection
Expected Behavior
Site should load
Steps To Reproduce
I have a docker-compose.yaml which contains my entire stack and network. I have everything in the one directory so all configs are:
./service_name/config:/config
I have used swag since it was called letsencrypt so my folder says that, anyway.
I have wordpress working with the local ip and can access no problem with the actual database connection, edit and publish pages, the works.
I followed this guide: https://docs.linuxserver.io/general/swag/#hosting-a-wordpress-site
I have this volume:
/home/my_admin/apps:/apps
I noticed that when this is declared:
root /config/sites/mydomain.tld/www
the index file is directly under that, it's not the case with my wordpress instance so I modified the root to be:
root /apps/wordpress/var/www/html;
This is after I tried to get around this by using symbolic link. I saw issue 137 but the op never replied. Maybe they did something else entirely, idk.
Environment
CPU architecture
x86-64
Docker creation
Container logs
The text was updated successfully, but these errors were encountered: