Support » Fixing WordPress » synology virtual host for wordpress site -error establishing database connection

  • Dear All

    I try to use synology virtual host to point to my wordpress site hosting in my synology box. below is my virtual host setup. After this, i try to access my site test.com. It pop up “Error establishing a database connection”. If trying to access test.com/wordpress, it will show 404. Is there anything i have to change in .htaccess or wp-config.php as i am new to test. please help as i have struggle with this a few days without any hints. please help and thanks!

    Hostname:test.com
    port 80/443
    document root: web/wordpress

    Johnson
    https setting: HSTS
    Http back end server: Nginx
    PHP: PHP 5.6

    • This topic was modified 1 year, 4 months ago by Yui. Reason: not a request/feedback
Viewing 5 replies - 1 through 5 (of 5 total)
  • Nginx doesn’t support htaccess files. You’ll need to translate the htaccess directives to the Nginx config file.

    Thread Starter johnsonleungmk

    (@johnsonleungmk)

    Dear jnashhawkins

    thanks for reply! can you kindly help me where to start with as this is my first time hosting the website in synology. Sorry for the confusion! I have purchased a domain ex. test.com and now it is actually pointing to my synology. It is able to accessing it while going to https://test.com/wordpress ,but I would like to take out the /wordpress in my site URL. Therefore, I try to use virtual host to point to my document root “web/wordpress” for trying to remove /wordpress in my site URL. But it didn’t success and might be I am going to the wrong the direction. pls advise and appreciate your help.

    Johnson

    Thread Starter johnsonleungmk

    (@johnsonleungmk)

    @jnashhawkins can you kindly help me with this as I can’t figure it myself.

    Your webhost should be able to help you on some of this… The first thing I’d ask them would be to ask for an Apache server but that’s me.

    I did find this document… I skimmed through it some but I reserve Nginx for proxies…

    https://www.nginx.com/resources/wiki/start/topics/recipes/wordpress/

    AFAIK that has nothing to do with the faulty db-connection. I’m struggling with the same issue. I can remember from a earlier attempt you have to use 127.0.0.1 instead of ‘localhost’ in wp-config or something like that. But that doesn’t help me this time.

    @johnsonleungmk did you solved it in the meantime?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘synology virtual host for wordpress site -error establishing database connection’ is closed to new replies.