The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
2answers
34 views

Ansible conditional statement based on other roles?

I've got the following scenario with an Ansible deployment: hostX has the role common-mta and a few other roles hostY has the role common-mta as well as the role package-postfix The common-mta ...
0
votes
1answer
33 views

Install application inside docker container , only when it has not been installed before?

Is there a way to install any application inside docker container , only when it has not been installed before? For example; RUN apt-get install -y nginx Will install nginx everytime on a new ...
1
vote
1answer
17 views

Conditional dependencies in CHEF

I have a complicated software stack that I manage with 2 recipes. recipe[stack::foo] recipe[stack::bar] foo is installed on every server, whereas bar is installed on only a subset of servers. bar ...
1
vote
1answer
84 views

Can someone explain nginx conditional flags? (-f, -d, -e, etc)

I'm in the process of migrating from Apache to nginx and have used http://winginx.com/en/htaccess to migrate the rewrite rules. I'm trying to understand what the translated ones mean though and I ...
1
vote
0answers
70 views

AD DNS conditional forwarding returns short name instead of fqdn

First of all this isn't a copy of DNS Conditional forwarder returns NETBIOS instead of FQDN (just sounds very similar). We have two separate domains that do conditional forwarding to eachother. Each ...
4
votes
1answer
222 views

Need to check whether you need to reboot for a kernel update?

I'm using Ansible to check hosts if they need to be rebooted if the /vmlinuz kernel doesn't resolve to uname -r. The if condition is although always identifing a reboot even though the test machine ...
2
votes
1answer
112 views

exim route file condition

Using exim4 I have set up a route to use an external SMTP server. I am using cPanel which keeps a list of domains set up locally on the server in the file: /etc/localdomains . As a result I have set ...
0
votes
1answer
303 views

DNS Conditional forwarder returns NETBIOS instead of FQDN

Strange DNS problem for which I hope you can help. Active Directory with NETBIOS name "Shortdomain" and as FQDN "verylongdomainname.lan". Domain controller DC01 behind firewall. IP: x.x.x.1 Customer ...
1
vote
0answers
60 views

Unable to match expression inside If directive no matter what

I have been trying for the past 3 hours trying to match an if statement to define a variable within httpd.conf with no success: <If "%{HTTP_HOST} =~ /[a-z]+/i"> Define test_value "A" ...
0
votes
2answers
349 views

Write an apache configuration, with condition based on the apache version

I want to write a configuration for an apache server which should work for apache-2.2 and -2.4 without alterations. Since there are a quite a few new modules in v2.4 which have to be loaded,and a few ...
0
votes
1answer
139 views

Nginx: security vs conditionals

I was reading around looking for some security steps that can be taken in Nginx to protect apps I'm serving using Nginx as a reverse proxy. I found this code which has some good things in it to ...
0
votes
2answers
517 views

Conditionally Rewrite Email Headers (From & Reply-To) Exchange 2010

I have a client who maintains Company A (with email addresses %username%@companyA.com) and they own the domain companyB.com however there is no "infrastructure" (no Exchange server) set up ...
0
votes
2answers
245 views

EXIM - Send local mail to Gateway First

My mail server is protected from spam by our Barracuda appliance. I'm trying to configure EXIM to forward ALL outbound messages to the Barracuda server first, including mail for local domains. Once ...
1
vote
1answer
628 views

Nginx - Apply basic auth only if an htaccess file exists

How can I apply basic auth only if an htaccess file exists? If first tried to put the auth_basic directives in an if block, but that is not allowed. Then, I tried redirecting to a named location, ...
1
vote
0answers
143 views

Apache2 conditional section based on port

I don't know much about if statements in apache configuration, and I'm wondering if I can have a section of the configuration applied only if the request is received on a certain port. In short, this ...
0
votes
1answer
764 views

Postfix conditional rules base on sending address

Email configuration on dev server: At the moment I have postfix configured to route all emails sent to itself. So if you try to send and email to any address say gareth@example.com it won't be ...
1
vote
2answers
837 views

Apache: Set global headers only if not already set

I am having a little annoying situation here. I have a server managed by plesk. In the /etc/apache2/apache2.conf mod_headers and mod_expires based configuration takes place. For example: ...
1
vote
1answer
407 views

apache if ie send some header

I want to set some headers just for MSIE using apache configuartion file. How can i set the condition for that ? # better website experience for ie users <IfModule mod_headers.c && ...
0
votes
1answer
323 views

Rebuilding a file if files have changed

I'm having a hard time wrapping my head around this. It seems trivial, but I'm not getting it. I have two files. If either of those two files changes, I want to rebuild one of them. Essentially: ...
0
votes
1answer
63 views

Discerning which GNU screen window is being used in a shell script

Using a shell script, how can you tell if a screen is running using shell scripts? For example, using pseudocode: IF (screen.screenname.running == TRUE) or something like that.
0
votes
2answers
198 views

Varnish and Browser Exceptions

I currently run a website behind a Varnish server, It contains a few browser conditions for Internet Explorer 6. Unfortunately Varnish is caching the first version it serves without taking into ...
1
vote
1answer
723 views

Conditional blocks of code in linux bash

Nearly everybody knows very useful && and || operators, for example: rm myf && echo "File is removed successfully" || echo "File is not removed" I've got a question: how to put a ...
0
votes
1answer
398 views

Apache 2.2, changing DocumentRoot depending on the HTTP auth credentials provided by client

Is this even possible? Say I have a server, devbox.local, which has several HTTP auth users: alan, bill, carl. What I'm trying to do is tell Apache to use a different DocumentRoot depending on who is ...
1
vote
2answers
1k views

Conditional `mount` in Linux: dev or nfs

I have a mount point — let it be /media/question — and two possible devices: a physical HDD and a remote NFS folder. Sometimes I plug the device in physically, in other cases I mount it via NFS. Is ...