Tag: linux
-
Openvpn centos 6.4 x64 with certificates
Renewed POST with new info, as openvpn package changed, not everything in old tutorial is true now :) This tutorial is based by old one Default centos repositoryt doesn’t have openvpn package, so lets add epel repository first. I downloaded it from this mirror here. yum install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm (link may be different depending on latest…
-
Wrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper cannot be accessed: (2)No such file or directory
If You got messed up with PHP in CentOS with plesk 10.4, You might get such error: # httpd -t Syntax error on line 65 of /var/www/vhosts/domain.tld/conf/13353493930.96968200_httpd.include: Wrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper cannot be accessed: (2)No such file or directory Small fix to make it work:
-
Creating debian template for lxc virtualization
To create debian template for lxc you need fresh copy of debian system. Well, we do have one installed recently on guruplug. All debian install on guruplug steps are here.
-
varnish+nginx as backend and real IP
With default config nginx all IP addresses shows as localhost. Here is configuration to show real client IP. Snippet from varnish config: sub vcl_pipe { set bereq.http.connection = “close”; if (req.http.X-Forwarded-For) { set bereq.http.X-Forwarded-For = req.http.X-Forwarded-For; } else { set bereq.http.X-Forwarded-For = regsub(client.ip, “:.*”, “”); } } sub vcl_pass { set bereq.http.connection = “close”; if…
-
Replace string in all files using sed in linux
Replaces all “OLDSTRING” to “NEWSTRING” in all files $ grep -rl OLDSTRING * | sort | uniq | xargs sed -i -e ‘s/OLDSTRING/NEWSTRING/’ or using find: find */public_html/ -iname ‘*.php’ -exec sed -i -e ‘s/OLDSTRING/NEWSTRING/’ {} \;
-
Guruplug serial connection
If you cannot connect to guruplug for some reason via lan interface, for example sshd stopped running or just firewalled yourself out of it, you can connect to it using serial connection.
-
Create tftp server on ubuntu 11.10
For some tasks, like loading bootloader you need to have tftp server. Here are few steps to set it up and get it running.
-
Recover mysql root password
It happens quite often, that You need to do something on database, which was installed long long time ago. And nobody remembers the root password. Kinda good practice is to save mysql password in root user directory with a “.” in front of it (hidden), for example .my.cnf Nobody can read root users directory, except…