Browsing articles tagged with "configuration - Admins Goodies"
Jul 11, 2013
tom

What solutions exist to allow the use of revision control for server configuration files? [on hold]

In an environment with multiple system administrators, I see a few advantages to adding the server config files into a revision control system. Most notable are the ability to track changes, who made them, and of course being able to roll back to known working configs. I’m mainly interested in Unix/Linux solutions, but would be curious to Windows implementations as well. Asked by Dave K I have tested this at home (~ 3 hosts) for […]

Continue Reading »
Jan 24, 2013
tom

Nginx rewrite rule “^/([a-z0-9]{32})\.png$” not working (used to work on Apache)

I have these rewrite rules (I tried both with no avail): location ~* “^/([a-z0-9]{32})\.png$” { rewrite ^ /index.php?page=log&id=$1 last; } and location ~* “/(?<hash>[a-z0-9]{32})\.png” { rewrite ^ /index.php?page=log&id=$hash; } and location / { try_files $uri $uri/ @rewrites; }location @rewrites { rewrite “^/([a-zA-Z0-9]{32})\.png$” /index.php?page=log&id=$1 last; #… } Basically, I want the URL http://example.com/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.png to actually pass the parameters to my index.php script, and in the script, I got: $db->save_hash($_GET[‘id’]); header(‘Content-type: image/png’); readfile(‘images/beacon.png’); break; But nginx is […]

Continue Reading »
Jan 20, 2013
tom

cannot restart php5-fpm

I’ve made some changes in the .ini files and wanted to restart php5-fpm. /etc/init.d/php5-fpm restart Jan 20 14:25:48.171577 [ERROR] bind() for address ‘/var/lib/php5-fpm/apps.sock’ failed: Address already in use (98) How can I find out what is using this address? I’ve already stopped nginx but that didn’t change anything. Asked by 32bitfloat You can use lsof lsof /var/lib/php5-fpm/apps.sock The output is lines containing the information COMMAND, PID, USER, FD, TYPE, DEVICE, SIZE/OFF, NODE, NAME e.g. lsof […]

Continue Reading »
Jan 15, 2013
tom

Cannot execute PHP file from domain name

Server run on Amazon Linux AMI** (similary to redhat) I follow the installation from Install PHP-FPM, Nginx, & MySQL on EC2 with Amazon Linux AMI It’s work properly if I call directly from server IP address like 174.129.213.152/index.php and I can access other file from my domain correctly like http://gamebiz.asia/robots.txt The problem is when I call php file http://gamebiz.asia or http://gamebiz.asia/index.php their result in blank page. I try change configuration from fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; to fastcgi_pass […]

Continue Reading »
Jan 15, 2013
tom

sendmail config, making open relay

I’m trying to find a sendmail.mc that allows open relaying without username/password to any system (im testing some code that uses SMTP). Google’d, could not find and it has been a long while since I modified sendmail config! (it’s a private system for temporary use) Thanks in advance Asked by Aiden Bell Try FEATURE(promiscuous_relay) According to the doco, By default, the sendmail configuration files do not permit mail relaying (that is, accepting mail from outside […]

Continue Reading »
Dec 26, 2012
tom

php5-fpm configuration pm – (node) Process manager settings nodes in more layman terms

I have the following configuration for php-fpm [www] listen = 127.0.0.1:9000 listen.allowed_clients = 127.0.0.1 user = www-data group = www-data pm = dynamic pm.max_children = 50 pm.start_servers = 25 pm.min_spare_servers = 5 pm.max_spare_servers = 35 pm.max_requests = 2500 pm.status_path = /php-status I read this http://php-fpm.org/wiki/Configuration_File Would appreciate a more human explanation of the pm related settings. Eg, what is pm = dynamic ? are there other possible settings for pm = ? pm.max_children sets the […]

Continue Reading »
Dec 24, 2012
tom

Samba share not usable by PHP-FPM?

I have a PHP-FPM and nginx setup that has been working perfectly on Ubuntu Desktop 12.04. The webserver’s files are served from a directory called /www, which is set as the root of the server. Initially, /www was mounted as a VMware shared folder (because the Ubuntu Desktop is running as a guest os). However, due to performance issues with shared folders (seeing a 2 second delay!), I am testing out samba shares. I have […]

Continue Reading »
Nov 15, 2012
tom

How to detect ssl in shared 80 / 443 ssl nginx server config?

When nginx server is configured this way: server { listen 80; listen 443 ssl; server_name www.example.org; … } how can be detected that the request came via HTTP or HTTPS? (E.g. $http_port is unusable, because the port is not specified explicitly, therefore it’s empty) Asked by mykhal http://nginx.org/en/docs/http/ngx_http_core_module.html#variables $https — “on” if connection operates in SSL mode, or an empty string otherwise $scheme — request scheme, “http” or “https” Answered by VBart Check more discussion […]

Continue Reading »
Nov 10, 2012
tom

Edit a file on CentOS 6.3 Minimal

I installed CentOS 6.3 Minimal on VMWare Player, and I realized how ‘minimal’ the setup is… Don’t have network connectivity. From what I searched on google, I need to edit the file /etc/sysconfig/network-scripts/ifcfg-eth0 but since I don’t have any editor installed (as far as I know), I don’t know how to edit the file. How do I edit the file???? Asked by CoCoMonk It’s virtually guaranteed that vi is installed, and maybe pico. Search Google […]

Continue Reading »
Oct 18, 2012
tom

Creating a new RAID1 array more quickly

I’m new to RAID. Creating a new RAID1 array from blank, newly-partitioned 100GB disks with sudo mdadm –create –verbose /dev/md0 –level=mirror –raid-devices=2 /dev/xvdf1 /dev/xvdg1 …looks to be taking about an hour to rebuild. My questions are: are there any shortcuts that can be taken on this initial “resync”, since there’s not (AFAIK) any data I need copied between the empty disks can I blithely format /dev/md0 and treat it like a normal disk while it’s […]

Continue Reading »
Pages:1234567...53»