Most Popular
1500 questions
46
votes
8 answers
Determine if filesystem or partition is mounted RO or RW via Bash Script?
Is there an easy way to determine if a mounted filesystem is mounted as Read-Only or Read-Write? I was thinking just to pipe mount but I thought there might be an easier way.
Jake Wilson
- 8,494
- 29
- 94
- 121
46
votes
15 answers
NGinx Best Practices
What best practices do you use while using NGinx?
The Pixel Developer
- 847
- 3
- 9
- 20
46
votes
4 answers
Using Same SSH Private Key Across Multiple Machines
I've got a Github repo I want to access from two different Linux machines.
For the first machine, I followed Github's instructions for generating SSH keys, and added the resulting public key to Github. This client works fine.
For the second…
Yarin
- 1,316
- 8
- 19
- 31
46
votes
4 answers
How to set up stats for HAProxy?
I can't figure out how to set up stats for HAProxy.
This is my configuration:
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
daemon
#debug
user haproxy
group haproxy
maxconn 4096
stats socket…
Jan Deinhard
- 2,363
- 5
- 26
- 33
46
votes
6 answers
How do I sudo over sshfs?
On my local host alpha I have a directory foo that is mapped via sshfs to host bravo as follows:
$ sshfs charlie@bravo:/home/charlie ~/foo
However, on host bravo there is another user, delta, that I want to sudo /bin/su as, so that I can do work in…
dirtside
- 1,481
- 4
- 17
- 22
46
votes
3 answers
why is loopback IP address from 127.0.0.1 to 127.255.255.254?
I do know that 127.0.0.1 ~ 127.255.255.254 are the loopback IP addresses for most modern operating systems and we could use these IP addresses to refer to our own computer. But isn't 127.0.0.1 enough?!?! why a wide range? why from 127.0.0.1 to…
kiana
46
votes
2 answers
how to update a symbolic link target (ln -f -s not working)
I'm using
ln -f -s
/var/www/html/releases/build1390
app-current
to update symbolic link "app-current" with a new destination.
However, this doesn't work, the link "app-current" keeps it original destination, however, I don't get any…
solsol
- 1,121
- 8
- 21
- 31
46
votes
3 answers
Find out which partition a directory is located on in Linux?
Is there a way to find out which partition a directory is located in?
I know I can use df to list partitions and mount points but I need to be able to find out which partition any directory is located in with a simple command.
Camsoft
- 911
- 4
- 12
- 21
45
votes
6 answers
DNS using CNAMEs breaks MX records?
We are trying to move all our websites we host to CNAMES as we are planning on moving servers in the new year and would like the ability to move some clients to one server and other clients somewhere else. We were planning on giving clients a unique…
johnwards
- 765
- 1
- 9
- 13
45
votes
4 answers
How do I show the actions that installing a .deb package will take?
I would like to be able to view the scripts/triggers associated with a package due for upgrade so that I can tell, for example, whether it will result in the web server being restarted. I can't find an aptitude option to show me that (or apt/dpkg);…
Sam Brightman
- 745
- 1
- 7
- 12
45
votes
3 answers
Ansible security best practices
I am going to introduce Ansible into my data center, and I'm looking for some security best practice on where to locate the control machine and how to manage the SSH keys.
Question 1: the control machine
We of course need a control machine. The…
Mat
- 1,783
- 4
- 22
- 39
45
votes
2 answers
Redis Cluster: (error) MOVED
I have a Redis cluster with the following nodes:
192.168.0.14:6379 master (slots from 0 to 16383)
192.168.0.15:6379 slave (slots from 0 to 16383)
192.168.0.16:6379 master (without slots)
Documentation says that any node can redirect queries to the…
Oleksandr
- 703
- 2
- 10
- 17
45
votes
5 answers
Why are many admins using 'Turn off Automatic Root Certificates Update' Policy?
My company distributes a Windows Installer for a Server based product. As per best practices it is signed using a certificate. In line with Microsoft's advice we use a GlobalSign code signing certificate, which Microsoft claims is recognised by…
Jeroen Ritmeijer
- 717
- 1
- 6
- 14
45
votes
5 answers
Is there a cloud-based reverse proxy solution in AWS?
The system
I have an API deployed on EC2 machines on AWS. Incoming HTTPS requests are passed to an elastic load balancer. The load balancer handles the SSL, and passes the request to an Nginx server, that proxies the requests to the specific…
Adam Matan
- 12,504
- 19
- 54
- 73
45
votes
6 answers
Appending to lists or adding keys to dictionaries in Ansible
(Related to Callbacks or hooks, and reusable series of tasks, in Ansible roles):
Is there any better way to append to a list or add a key to a dictionary in Ansible than (ab)using a jina2 template expression?
I know you can do something like:
-…
Craig Ringer
- 10,553
- 9
- 38
- 59