How to run CGI scripts on Nginx

Nginx doesn’t have native CGI support (it supports fastCGI instead). The typical solution for this is to run your Perl script as a fastCGI process and edit the nginx config file to re-direct requests to the fastCGI process. This is quite a complex solution if all you want to do is run a CGI script. … Read more

Unable to start postgresql service on CentOS 7

Make sure you have installed all packages correctly and updated yum repository sections [base] and [updates] before installation as it mentioned in the guide . We have CentOS 7 with PostgreSQL 9.5 and it works perfectly fine with following steps: vi /etc/yum.repos.d/CentOS-Base.repo yum localinstall http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm yum list postgres* yum install -y postgresql95-server.x86_64 postgresql95-contrib.x86_64 postgresql95-libs.x86_64 /usr/pgsql-9.5/bin/postgresql95-setup … Read more

Errr ‘mongo.js:L112 Error: couldn’t connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:L112’

If you are running Ubuntu, then there is an issue with folder ownership. Run these commands: Stop the MongoDB service sudo service mongodb stop Remove the MongoDB lock file sudo rm /var/lib/mongodb/mongod.lock Change ownership from root to the MongoDB path sudo chown -R mongodb:mongodb /var/lib/mongodb/ Start the MongoDB service sudo service mongodb start Test the … Read more

JS and CSS files in vagrant not properly encoded when saved outside of the VM

I had this problem this morning. Set EnableSendfile to off in your httpd.conf. If you look at your httpd.conf it says “turn this off if you serve from NFS-mounted filesystems.” In http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile it explains that “By default, when the handling of a request requires no access to the data within a file — for example, … Read more

Dockerfile: Docker build can’t download packages: centos->yum, debian/ubuntu->apt-get behind intranet

PROBLEM Talking to some developers at #docker@freenode, the problem was clear to everyone: DNS and the environment. The build works just fine at a regular Internet connection at home. SOLUTION: This problem occurs in an environment that has a private DNS server, or the network blocks the Google’s DNS servers. Even if the docker container … Read more

Mongodb service won’t start

After running the repair I was able to start the mongod proccessor but as root, which meant that service mongod start would not work. To repair this issue, I needed to make sure that all the files inside the database folder were owned and grouped to mongod. I did this by the following: Check the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)