I'm working in framework Phalcon, which uses PHP. I wasn't able to connect my application with Postgresql. I discovered this webpage: Enabling PostgreSQL support in PHP on Mac OS X, which basically says I should download something like "php_pdo_pgsql.so" and following a well voted solution I did:
brew install php56-pdo-pgsql
sudo /usr/sbin/apachectl restart
The server is temporarily unable to service your request due to
maintenance downtime or capacity problems. Please try again later.
I solved it! There were no more errors in apache log. Why? When I installed the PDO of php-postgresql with brew, it automatically installed apache of brew and change the configuration of the server. So, I had 2 "apache" in my server, what screw up everything.
I used this tutorial: https://getgrav.org/blog/macos-sierra-apache-multiple-php-versions. In general terms, What I did was uninstallig everything I could and installing apache from brew. Then I made the configuration of the tutorial and finally my webpage is running again. Thanks.