Nginx > removing if from dynamic site root

I currently have the following nginx config, which is working great. e.g. For url domain1.foo.com tries to serve root /var/www/domain1 if it exists if doesn’t exist, serve root /var/www/_default server { # .. truncated .. # server_name ~^(www\.)?(?<domain>[^\.]+); root /var/www/_default; location / { if (-d /var/www/$domain) { root /var/www/$domain; } if (!-d /var/www/$domain) { root…

Sendmail.mc MAIL_HUB and LOCAL_RELAY for multiple domains

I have set up sendmail mail_hub and local_relay options using the answer from here: Disable local delivery in Sendmail However, we now have multiple domains (mydomain1.com and mydomain2.com) sending email from the same server and sendmail config. If I set “MAIL_HUB” and “LOCAL_RELAY” to one of the domains, the other one will not send emails…

Publishing CNAME to Avahi over DBUS requires long lived process

I am attempting to setup CNAMEs in Avahi in order to broadcast multiple hostnames. I’ve found a variety of examples online that all work but they all require long lived processes: https://github.com/Dalee/avahi-cname-aliases/blob/master/avahi_cname_aliases/init.py#L83 # run and stay foreground def run(self): self.set_handlers() self.load_aliases() self.publish_aliases() # keep aliases published while self.running: time.sleep(TTL) https://github.com/george-hawkins/avahi-aliases-notes/blob/master/avahi-alias#L48 for name in sys.argv[1:]: publish_cname(name)…

Apache connections stuck on “sending reply” and high mysql load

Apache on my dedicated server constantly hangs due to connections being stuck in a state of “sending reply”: Apache status: connections stuck in “Sending Reply” This happens at least several times a day – sometimes it won’t happen for 2 or 3 hours, sometimes it’ll happen constantly to the point where all connections will be…