Mediawiki Fix Internal Server Host Names / Redirection In shared Hosting or Proxy Setup

Posted on in Categories , , , , last updated January 27, 2012

Our customer support wiki runs on an internal host (ip:192.168.1.100:300, hostname a-node100.:300) and it is behind the nginx reverse proxy server. However, our Apache server end up displaying internal server name http://a-node100.:300/, which results into an unexpected redirection and timeouts as http://a-node100.:300/ is not accessible over the Internet. How do I force nginx or apache to use the base URL of our server (http://support.example.com/wiki/)?

OpenBSD: Setup a Serial Console

Posted on in Categories last updated December 1, 2012

How do I enable console redirection under OpenBSD so that I can see my remote server boot information and any diagnostic information that is normally printed to the screen? I’ve already enabled serial ports in my server BIOS and wired them up. How do I configure and access OpenBSD UNIX x86/amd64 server over serial console?

Printing output of c program to a file in Linux

Posted on in Categories , , , , last updated August 17, 2007

Q. I’ve written a small program that does something useful for me. I always get output on screen. Sometime I need to send output to a file. How do I print output of my program to a file w/o making any changes to code?

A. Bash shell (and many other modern UNIX shell) supports the concept of I/O redirection It allows you to redirect standard output (screen), standard error and standard input (keyboard) using the following syntax.
command > output.file
command < input.file command >& error-n-output.file

So to redirect output of your own C program just enter:
$ ./myprogr > output.txt
$ cat output.txt

Linux: Configure / Enable Serial Console By Editing GRUB Boot Loader

Posted on in Categories , , , , , , last updated February 25, 2013

How do I configure and enable console redirection in the BIOS? I want see my remote dedicate server boot information and any diagnostic information that is normally printed to the screen. I’ve already enabled serial ports in my server BIOS and wired them up. Now how do I configure and access Linux over a serial console?