Skip to main content

Posts

iis 7 - IIS 7 Reverse Proxy based on domain name host?

How would I configure IIS 7.0's ARR and URL Rewrite to reverse proxy based on a host. For example: http://website1.mydomain.com gets routed internally to internalserver\website1 http://website2.mydomain.com gets routed internally to internalserver2\website2 http://website3.mydomain.com gets routed internally to internalserver2 (default website) FYI - The public DNS website1.mydomain.com and the rest are all actually pointing to the public IP of mydomain.com. Note that this is not all the same server. There are multiple web servers INSIDE the firewall and one plain default web server whose port 80 and 443 are exposed to the outside. I have one IP Address and one domain name. Thus, since I have multiple web servers inside my firewall, I need to route hostname subdomains to different web servers on the inside. Any detailed steps would help tremendously. Answer Since you're relying on the domain name rather than IP (which is easier in this situation), here's the m...

Is it possible to alias a hostname in Linux?

Is it possible to alias a hostname in Linux? It has been asked by jmillikin at various Ubuntu forums as follows: Is it possible to create a hostname alias? Sort of like /etc/hosts, but with other hostnames rather than IP addresses. So that with some file like this, you could ping "fakehost1", and it would be re-mapped to "realhost", and then "realhost" would be resolved to an IP address. # Real host # Aliases realhost fakehost1 fakehost2 fakehost3 Somebody has answered about ssh, but not about ping, etc. My main purpose is to use it as an alias for a Subversion server. In my case, realhost is under a dynamic IP address. So, the "/etc/hosts" alias doesn't work. I want to access my Subversion server as svn://my_svnserver/my_repos instead of svn://realhost/my_repos .

linux - Checking RAID events log or history of a Smart Array P400 in a HP ProLiant DL380 G5 server

In a rack-mounted HP ProLiant DL380 G5 server, running Linux (RHEL - Red Hat Enterprise Linux Server - version 5.9, 64-bit): after a shutdown and power on, one of 4 hard disks of a Logical Drive using "RAID 1+0" started "Rebuilding". I was able to check the status using hpacucli (" HP Array Configuration Utility CLI ") After a few hours, the rebuild was completed successfully (the previously defective hard drive was "physicaldrive 2I:1:2"): $ hpacucli HP Array Configuration Utility CLI 8.0-14.0 Detecting Controllers...Done. Type "help" for a list of supported commands. Type "exit" to close the console. => ctrl all show config Smart Array P400 in Slot 1 (sn: ...) array A (SAS, Unused Space: 0 MB) logicaldrive 1 (273.4 GB, RAID 1+0, OK) physicaldrive 2I:1:1 (port 2I:box 1:bay 1, SAS, 146 GB, OK) physicaldrive 2I:1:2 (port 2I:box 1:bay 2, SAS, 146 GB, OK) physicaldrive 2I:1:3 (port 2I:box 1:bay ...

domain name system - Redundant DNS setup

I have a problem with my DNS setup and I really can't understand what's wrong with it. We host our own public DNS servers on 2 different networks (technically, we have 3 DNS servers on 3 different IP ranges but only 2 are in different physical locations). This weekend, the primary DNS server for one of our domains hung (I have no idea why yet, but it's a different matter). Strangely, this caused all external DNS requests for that domain to fail. Now, it's always been my impression than the whole point of providing multiple DNS servers was that if one failed, the others would take over (or rather, that the clients would query next available NS server if the one listed in the SOA failed). Yet, until we restarted the primary server, no query would succeed even though all other DNS servers where up, running and answering properly to queries (Authoritative answer to all requests to the zone). I've checked that the SOA is correct, that all DNS servers have properly regist...

networking - How do I access my WAN IP internally according to my existing iptables port forwarding rules?

I have IPTABLES newly set up on my Debian Squeeze server and I have IP masquerading and port forwarding working successfully with it, however if I type into the URL bar my WAN IP or DynDNS hostname, I get a connection error. With previous consumer routers, if I had gone to http://[myhostname] , it would load 10.0.0.3:80 as specified below. This works externally (tested using a 3G phone) but not internally (using any internal browser). This is the same for all forwarded ports. I'm trying to get port forwarding to work internally as well. If anyone knows the correct incantation(s) for this, it'd be greatly appreciated. I've tried searching Google but am unsure of the correct search terms for the issue. My configuration is as follows: # Generated by iptables-save v1.4.8 on Thu Apr 14 15:58:27 2011 *mangle :PREROUTING ACCEPT [1216168:676166344] :INPUT ACCEPT [2375:260404] :FORWARD ACCEPT [1213765:675875465] :OUTPUT ACCEPT [1930:203384] :POSTROUTING ACCEPT [1215695:676078849] -A...

virtual machines - Automatic VM capacity planning

Situation: I've got a bunch of blades, all with same amount of memory and cores in each. Some have local storage, some do not and rely on the SAN. I've also got a ton of VMs that I need to build and drop on these blades. There are about 7 or 8 different instance types, each which has the same spec. For example, instanceA has 2 GB RAM/2 cores/100 GB SAN storage. InstanceB has 4 GB RAM/8 cores/60 GB blade-local storage. InstanceC has 16GB RAM/4 cores/100 GB blade-local storage. Etc. Is there some sort of tool somewhere that I can run/get/etc that I can punch in each blade and instance spec, and said tool will automatically propose which blades to put instances on, while leaving a bit of room for overhead? Even an Excel template or something would work. List of VMs and hosts goes in, locations of VMs on guests comes out. VMware with vSphere. Any input is appreciated

email - What happened to all the spam?

Don't get me wrong, I'm mostly glad that this happened. However, I want to make sure that the reasons for it happening are sound - rather than there being a problem with our methods. I'd like to illustrate what's going on here with a graph: http://lightspeed.ca/personalpage/ernied/spam_junk-year.png The bright green line here shows the rate at which our server has rejected messages from IP addresses listed in realtime blacklists over the course of the last 12 months. Last May, we were rejecting an average of about 175 messages every 5 minutes, or 35 per minute, using this filter alone. It's pretty clear that since October, it's tapered off to a fraction of that - we're now averaging about 8 rejected messages per minute on this filter: http://lightspeed.ca/personalpage/ernied/spam_junk-week.png Since we see no corresponding rise in the number of messages being trapped by Spamassassin (the teal line largely drowned out at the bottom of the graph) or any other ...

Ways to set umask on Ubuntu for daemon processes

I have an http daemon server process (yaws) that I would like to have server write any new files with a umask of 002, so that another user in the same group can modify, move, or delete files created by the daemon process. This is on Ubuntu 10.04. Unlike Apache, yaws does not have a configuration option for umask, so what methods are there for setting the umask of any daemon process? I found this answer about changing the init script to add umask 002 . This did work, but I'm not sure editing the init script is the best way of making this easy to document and configure on multiple machines. I also found reference to the pam_umask module here . It looks like this allows per user settings of the umask to be configured in the GECOS field of /etc/passwd. Are there any other ways to set the umask for daemon processes? And what would be the recommended way? Answer Create a .profile file in the daemon's home directory: #!/bin/sh umask 002 You can find the daemon'...

centos6 - Apache want port 80 without binding it to this port

When I want to start my apache server, it shows me this error: Starting httpd: (98) Address already in use: make_sock: could not bind to address [::]:80 (98) Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs [FAILED] My httpd.conf file: Listen 8181 As you can see, I have deleted everything else. Still, Apache wants to bind to port 80 which is used by varnish. Any idea how to solve it?

linux - Why is "chmod -R 777 /" destructive?

This is a Canonical Question about File Permission and Why 777 is "destructive". I'm not asking how to fix this problem, as there are a ton of references of that already on Server Fault (reinstall OS). Why does it do anything destructive at all? If you've ever ran this command you pretty much immediately destroy your operating system. I'm not clear why removing restrictions has any impact on existing processes. For example, if I don't have read access to something and after a quick mistype in the terminal suddenly I now have access well... why does that cause Linux to break? Answer First of all a minor terminology nitpick: chmod doesn't remove permissions. It CHANGES them. Now the meat of the issue -- The mode 777 means "Anyone can read, write or execute this file" - You have given permission for anyone to do (effectively) whatever the heck they want. Now, why is this bad? You've just let everyone read/modify e...