≡ Menu

FreeBSD

How to create a new config file in Ansible playbook

I wanted to create a file named /etc/apt/apt.conf.d/1000-force-ipv4-transport with the value set to ‘Acquire::ForceIPv4 true;’ on 20 cloud servers hosted in AWS. I already setup Ansible playbook to automate stuff. How do I create a new file using Ansible playbook? Is it possible to create a complex file with many lines of text (say squid.conf) using Ansible IT automation tool?
[click to continue…]

PHP Fatal error: Call to undefined function gzinflate()

I have a php script and whenever I run it, I get the following error message in my log file:
     2017/02/05 23:25:46 [error] 9696#9696: *10 FastCGI sent in stderr: “PHP message: PHP Fatal error: Call to undefined function gzinflate() in /home/xxxx/http/includes/functions.php(1) : eval()’d code on line 1″ while reading response header from upstream, client: 10.218.105.1, server: newsletter.cyberciti.biz, request: “GET /a/ HTTP/1.0”, upstream: “fastcgi://127.0.0.1:9000”, host: “server1.cyberciti.biz”
How do I fix this problem on Alpine Linux or Unix operating systems?
[click to continue…]

How to configure Nginx for WordPress permalinks

I switched from Apache to Nginx web server. How do I configure permalinks under WordPress blog?
[click to continue…]

How to open a file in vim in read-only mode on Linux/Unix

I need of opening necessary files in reading (read-only) mode to avoid accidental editing of files such as /etc/resolv.conf or a large config or programming file on a production server. How do I open files in read-only mode in vim text editor on Linux or Unix-like system?
[click to continue…]

How to install FreeBSD 11 on Google Cloud Compute

How can I deploy or install FreeBSD version 11.x Unix operating system on the Google cloud engine? Do I need to create my own FreeBSD disk image to start with the Google Cloud Compute?
[click to continue…]

How to setup MariaDB SSL and secure connections from clients

I am looking to setup MariaDB SSL (Secure Sockets Layer) and secure connections from MySQL client and PHP application. How do I enable SSL for MariaDB server and client running on Linux or Unix-like system?
[click to continue…]

How to ignore invalid and self singed ssl connection errors with curl command

I wanted to curl command to ignore SSL certification warning. Does curl command have a --no-check-certificate option like wget command on Linux or Unix-like system?
[click to continue…]

How to log real user’s IP address with Nginx in log files

My nginx server is behind a reverse proxy load balancer. How can I show the correct client IP address in nginx log files when nginx is behind a load balancer?
[click to continue…]

I configured and use my openssh server to accept only public key based authentication. I need to test if my server accepting password. How to allow ssh client to use only password auth when pubkey auth configured?
[click to continue…]

How to copy a single file to multiple directories in Linux or Unix

If I want to copy a single file into three locations (directories), by using a single cp command (e.g. cp file /dir1/ /dir2/ /dir3/. Would that be possible? If yes, please provide the command for GNU/Linux or Unix operating systems.
[click to continue…]