How to handle relative urls correctly with a reverse proxy

The Apache ProxyPassRewrite does not rewrite the response bodies received from http://test.example.com, only headers (like redirects to a 404 page and such). A number of alternatives: One) Rewrite the internal app to use relative paths instead of absolute. i.e. ../css/style.css instead of /css/style.css Two) Redeploy the internal app in a the same subdirectory /folder rather … Read more

Command line program to test DHCP service

Even if you don’t use a Nagios monitoring server, you can grep the check_dhcp binary or compile it from source and use the check to test a DHCP-Server. E.g. ./check_dhcp -v -s <dhcp_server_address> -r <expected_ip_address> -m <mac_address_touse>

What is the debian-sys-maint MySQL user (and more)?

What is debian-sys-maint used for? One major thing it is used for is telling the server to roll the logs. It needs at least the reload and shutdown privilege. See the file /etc/logrotate.d/mysql-server It is used by the /etc/init.d/mysql script to get the status of the server. It is used to gracefully shutdown/reload the server. … Read more

How can I zip/compress a symlink?

You can store symlinks as symlinks (as opposed to a copy of the file/directory they point to) using the –symlinks parameter of the standard zip. Assuming foo is a directory containing symlinks: zip –symlinks -r foo.zip foo/ Rar equivalent: rar a -ol foo.rar foo/ tar stores them as is by default. tar czpvf foo.tgz foo/ … Read more

How do I join two named pipes into single input stream in linux

Personally, my favorite (requires bash and other things that are standard on most Linux distributions) The details can depend a lot on what the two things output and how you want to merge them … Contents of command1 and command2 after each other in the output: cat <(command1) <(command2) > outputfile Or if both commands … Read more

memcache vs memcached?

The short answer: Either one is what you are looking for, but my first choice would be memcache (the first one you listed), purely based on its correct use of nomenclature. Now here’s how I came to that conclusion: Here is a quick backgrounder in naming conventions (for those unfamiliar), which explains the frustration by … Read more

Dump a linux process’s memory to file

I’m not sure how you dump all the memory to a file without doing this repeatedly (if anyone knows an automated way to get gdb to do this please let me know), but the following works for any one batch of memory assuming you know the pid: $ cat /proc/[pid]/maps This will be in the … Read more

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