Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

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)


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

joined:Aug 10, 2004
votes: 116

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

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members