Welcome to WebmasterWorld Guest from 35.175.190.77

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

error establishing database connection

help with apache2 webserver

     
9:18 pm on Dec 9, 2017 (gmt 0)

New User

joined:Dec 9, 2017
posts: 2
votes: 1


Hello everyone, I have recently setup an apache2 web server for my personal site but I can access the site when I enter my public ip. I get "error establishing database connection", but when i use local ip my site works fine. Any help would be appreciated. Here is some more info, it's a debian 9 stretch os, mariadb, php 7.0.19-1, apache2.
11:42 pm on Dec 9, 2017 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:11465
votes: 174


welcome to WebmasterWorld [webmasterworld.com], x3eemguy!

have you checked the server access and error log files for clues?
9:15 am on Dec 13, 2017 (gmt 0)

New User

joined:Dec 9, 2017
posts: 2
votes: 1


Hey, sorry for not replying earlier. As soon after I posted this thread I figured what was the problem. The fix: I had 2 virtual host, one was not fully setup so it showed error establishing database connection and the other was fully setup with server name as local ip, but I did not set the fully setup virtual host as default...newbies lol