IIS & ISAPI Redirects...anything Faster Than The GUI
Apr 10, 2007
So I have been reduced, I am a firm *nix Apache user, to using IIS along with ISAPI for redirection at work. Now I can setup the redirection(s) just fine using the GUI, but I am a *nix man and doing this through the GUI is SLOW! That is when it has to be done on 3 servers at a time plus I can only access those servers through a Citrix environment.
And I need to be adding redirects many times a week. Is there any way to setup ISAPI redirects from a command line? Google has offered me nothing.
There are a lot of permanent redirects in one of my customer's server. I tried to remove them through clicking the remove button but although it gave a "deleted" message, it failed to do so..
Are you sure you wish to permanently remove the redirect ** All Requests ** on ** All Public Domains **
I click YES and i got the message below.
The redirect ** All Requests ** on ** All Public Domains ** has been removed.
But redirect define is still there.
What should i do? I can access to server via SSH. So may be i can handle with this just editing some file(s)?
I update the corporate website for my company. Our server is IIS and when I need a 301, I have to send a request to IT to do it, as our pages are static .html and .shtml (SSI) and using javascript redirects is not ideal for SEO.
A redesign we're going to be deploying, will include the shuffling of several pages/directories and redirecting of quite a few URL's. This fact alone seems to provide a good argument convincing IT that this is a good idea. From what I've read here and elsewhere, heliontech's solution seems to be the way to go.
Since this is 3rd party, I'm looking to have further leverage to explain my case on behalf of using this. Are there benchmarks and data that support the reliability of this method versus the straight MS stuff?
Also, I'm not real tech savvy on the server end, but I was told that our corporate site and application sites may reside on the same box and that applying the ISAPI rewrite would affect those as well. This would obviously make it a "no sell" with my IT colleagues.
Would sites residing on the same server be globally affected by the ISAPI? If so, is there a way to circumvent this and just set the ISAPI for the one site?
i have custom dll built with Delphi that used to work on IIS 5/6/7. After i migrated to apache, DLL started to crash after an hour or two and i have to restart the server. The error was something about bad header. Since the developer says DLL is handling reponses OK and i can't get anything with debug logging on apache side can i run DLL as CFG/FastCGI (not that versed with apache so maybe this question does not make sense)?
we're using IIS 5.0 which doesn't have any flexible support for rewriting URLs which include parameters (AFAIK, anyway). We're currently testing an ISAPI Rewrite Plugin, which emulates the syntax and behaviour of mod_rewrite, which is why I felt this forum category to be the most appropriate for this post.
Our URLs at the moment look like:-
[url]where 'hg' is an instance of a key. In this particular example, we wish to rewrite our URL to read [url]homegarden' where 'homegarden' is a value of that respective key.
Since the value 'homegarden' isn't present in our current URL, we need some way to associate this value with it's relevant key, by mapping one to another. The ideal solution in this case would be to use RewriteMap, however the ISAPI plugin doesn't support this directive.
One other solution, that I've seen here is to use the 'homegarden' value as the key instead. However, due to the lack of flexibility of our system, this isn't possible.
Another method of achieving this is to hard-code a RewriteRule for every instance of a key, but this solution has obvious performance drawbacks (we have around 400 categories)
So, at the moment I'm out of ideas, which is why I thought I'd try and rack your brains for suggestions. An ideal scenario would be to use something like RewriteCond (which is supported by the plugin) to attach a file which would contain the key/value map.
Since about 2002 I have constantly had my own co-located and then dedicated box. Before that, the only paid host I ever used was verio.net. Now that I sold off most of my sites, it is time to move to a smaller, shared hosting plan.
My question is can anyone suggest a good hosting plan? I do not need a lot of space or bandwidth, but I do require a few things:
- ASP.net 3.5 is a huge plus, but 2.0 is do-able
- At least one msSQL database
- Daily backups is also a huge plus. I don't need this second, but eventually I will want it.
- Good technical support is a must. I have dealt with to many companies even with my dedicated hosting that offered horrible tech support. A three day wait on a question is not acceptable. Phone support is a plus, but a 24 hour reply on an email is enough.
- ISAPI-Rewrite, or an equivalent is a must. I rewrite my URL's for SE rankings, as I believe everyone should, so the ability to host a rewrite script is a must. Though I use ISAPI-Rewrite, if their is an equivalent that is do-able.
- Need to be able to run at least (2) domains. My main company domain and then a second domain which is basically a landing page. In future I need a 3rd domain added, so ability to upgrade or add on a domain cheaply is a must too.
If you own a hosting company that matches this, or can suggest any please do so. If you suggest and they offer a referral program feel free to let me know your referral code as you obviously deserve the credit for suggesting the company.
I'm using IIS 6.0 and an isapi dll created in Delphi, and I'm getting an error which I cannot understand.
At some point when I make a request for this file I get an error in Firefox ("The connection to the server was reset while the page was loading"). At the same time http error log is full of "Connection_Abandoned_By_AppPool" messages. After this happens, there is almost nothing I can do - I tried recycling the application pool, then I tried restarting the IIS server, and finally I reset the computer - NONE of this helped.
The only thing that resolves the issue is to recompile the dll and replace it (the source is absolutely the same). After that everything works fine.
I have a separate App pool for this dll (not executing in DefaultAppPool). At first, I thought that the problem lies in "Rapid fail protection" so I have disabled it, but the problem hapenned again.
The biggest issue is that this problem hapenned exactly 4 times in two months. It's very rare, and very hard to debug.
Finally, I have discovered on thing that could lead to the solution (with somebody's help :-)). I have enabled recycling for this pool every 2 hours. Looking at the event log in windows, I have found out that the problem always occured after the pool was recycled. So, each time this problem hapenned I have this logged in Event log as an information message:
"A worker process with process id of '2312' serving application pool 'PromjenePool' has requested a recycle because the worker process reached its allowed processing time limit. ".
After that, in my log there is a series (hundreds, thousands) of error messages, two or three in a second, first of them coming just a few seconds after information about recycling. The warning messages are like this:
"A process serving application pool 'PromjenePool' terminated unexpectedly. The process id was '2604'. The process exit code was '0x1'. "
The first thing that my dll does is that it logs that it has been initalized to a log file. After this happens, there is no trace of initialization in my log file. So, probably dll is never loaded, or it crashes when it tries to open the file.
So, to resume, I have recycle periods of 120 mins, and about 300-400 recycles happen without any problem. After one recycle, I just keep getting error "The connection to the server was reset while the page was loading", httperr log contains loads of ""Connection_Abandoned_By_AppPool" messages, and event log is logging that process serving my pool is terminating unexpectedly. The most bizzare thing is that recycling the dll, restarting iis or computer won't help, the only thing that surely helps is to recompile the dll (same source).
Just to add - if it can help - all dll is basically doing is connecting via TCP sockets to a data feed, constantly reads data and publishes it through dll. There is no connection to database, just sockets and appending messages to local file.
I am talking like a few thousand sites per server (actually a pair that act as a unified server, routing for load balancing). In a muli-thousand site IIS server, will having ISAPI Rewrites enables for ALL of the IIS virtual sites cause performance to degrade?
I've read that php 4 is faster than 5, is this true? I'm not sure which one I should use to host my invision powerboard. It's the only php/mysql site on the server.
I know the assumption is that VPS is faster than shared, but my site currently runs on a shared server with a host that does not oversell, and it runs very fast for a WordPress and gallery site.
I'm certain the shared server is at least a dual CPU monster, and it rarely goes above 5% usage. So if I move this site to a VPS it seems logical to me that it might not be as fast.
I just changed hosts, thinking it would be faster. My homepage uses 53MB of RAM. My old host lets me use ini_set to change this (currently have it at 128MB), my new host doesn't (48MB).
So, I've cut some of the functionality of the site to make it work on the new host. Should I upgrade the hosting plan to higher RAM? Given that the site already works reasonably well on the new host, what type of performance boosts could I expect to see by doubling the RAM?
I am going to upgrade my servers and move all the accounts. Of course DNS IP's will change.
Last time I did this, I just created exactly same DNS on new server (eg. ns11.server.com and ns12.server.com) and updated the IP address of the DNS on the registrar. However it took more than 2 days for some domains to update the new DNS IP address. It was a nightmare.
So my options are: 1) Do the samething as before 2) Create new DNS addresses (eg. ns5.server.com and ns6.server.com) and update the DNS info of all the domains.
I live in Hawaii and half my sites serve Hawaii. Webhosts in Hawaii are really expensive. Does it matter where on the mainland US that I host my sites? Would they serve the fastest if I host them in California considering it's the closest to Hawaii?
These new "rules" make BFD ban faster, checks every minute. BFD only checked every 10 minutes and could miss attackers that show up at the right time. Now we keep 10 minutes of IPs, and ban using that list.
I feel that APF and BFD are still the best choices for protecting my server. Cpanel's new "cphulk" feature has a lot more to go to be as good, plus you have total control with BFD where you can add and change rules to suit your needs as they grow, or modify them for particular problems.
The changes I made are based on the latest version of BFD V0.9, you should have that version installed and WORKING ALREADY.
Remember, they are simply shell scripts that define the log file to keep track of and what keywords to trigger on. You can view them with any text reader.
WARNING: These work for me, USE AT YOUR OWN RISK, always make sure you add your current IP in /usr/local/bfd/ignore.hosts (and) /etc/apf/allow_hosts.rules so you don't accidentally ban yourself!
Inside the below tar.gz file are my modified "rules" files for exim, pure-ftpd, rh_imap, rh_pop3, sendmail and sshd. No changes to the BFD V0.9 main program are needed.
You should change the cron job to run BFD every minute, edit this file: /etc/cron.d/bfd
Change the line in that file to this so it runs every minute: */1 * * * * root /usr/local/sbin/bfd -q
I checked the CPU load and since it's reading only a small part of the log file every minute, the CPU load isn't bad, it's done in about 8 seconds on my system. Expect a small rise in load average since it is doing work more often.
The "rules" files are contained in your server directory: /usr/local/bfd/rules
The "rules" files should be REPLACED with the new ones, if you want to keep the old ones around then MOVE THEM OUT to another directory NOT INSIDE the "rules" directory, or else they will be run when BFD runs.
If you need apache, proftpd or other "rules" then you will have to modify them yourself, otherwise you should move these out of the "rules" DIRECTORY, they will not do much with BFD set to run every minute (unless you modify them yourself). I only modified the rules I needed for my server, feel free to post your own mods here.
OK enough, here's the file:
[url]
(it's also attached to this message, see below)
This file will only be around for a few months on this free upload site. Someone please put it in a good place/mirror and post a link, thanks.
Technical details:
This runs every minute but keeps a list of the last 10 minutes of bad IPs in a file in tmp, trimming the file every minute so only new IPs are saved.
You can see the list of IPs in files such as: /usr/local/bfd/tmp/.exim /usr/local/bfd/tmp/.sshd
The marker "----" (four dashes) is used to mark each minute and is ignored by BFD but used to trim the old IPs off the file.
If the number of "----" are more than 10, it trims the top of the file up to the marker every run. If the file doesn't exist it's created.
The exim filter "grep" part was modified slightly because the old one was producing bad data every once and a while. The others are all the default filters that come with V0.9.
(BFD people feel free to add this to the next version update, I consider it GPL)
I've ordered 1gbit/s port with one my dedicated servers. But I am still unhappy with the speed of download.
I have 2 mbit DSL connection at home and I can download files with 90 kb/s from the server. I also see the same speed on a 100mbit port server. But I can download files from RapidShare with 210 kb/s..
What do you recommend me to do make faster downloads from server-side?
I have heard that Direct Admin is much faster then cpanel & require much less resources then cpanel... I was just wondering if I get vps with 128 ram with Direct admin on it, would it be better than vps with 256 ram with cpanel installed... I am running 3 websites with almost 10 to 20 users at a time (at max 50).... I like both cpanel & directadmin but was thinking if 128 ram with DirectAdmin can give more speed on 128 then I won't spend more money on 256 with cpanel... If anybody have an opinion then please put it here...
In a system with all-in-one solution -- WEB, EMAIL, MySQL, FTP..in a same hard-disk.
Would you prefer a "Last Longer" - SATA2 Enterprise Harddisk (Western Digital or Seagate) OR Would you prefer a "Spin Faster" - SATA1 RAPTOR (Western Digital)
I've been working in this industry for 5 years now. Over the years, I've come to realize the little things that customers do that REALLY piss tech support off. This is a guide for customers for 10 things NOT do when contacting their host's technical support team.
This is a repost of what I already posted before the big catastrophe.
Please forgive the brutal honesty. It's for your own good.
1. One ticket per issue. Emailing your issue to Support, Sales, Billing, Abuse, the owner, each individual tech, and the mayor of your town is not going to get your ticket answered any quicker. Additionally, opening 2, 3, 4, or 10 tickets isn't going to get things done any faster. Seriously - all it will do is irritate the support guy
2. Contact the proper department If your account is suspended due to non-payment, or your account hasn't yet been setup, or you want to upgrade your account - please don't bother contacting support hoping it'll get done faster. All it will do is slow down their response time to customers that have actual support issues. Billing issues goto Billing. Sales issues goto Sales. Abuse issues goto abuse. Get the picture?
3. Contact support via ONE medium If you put in a support ticket, don't get on live chat and call too. Trust me - you'll get the same answer on live chat and the phone as you will in the ticket . Same goes for requesting "updates" on your ticket - if your ticket is in queue, wait patiently for a response. If you don't get a timely response, contact the management to complain.
4. Everyone thinks their ticket is CRITICAL Tech support reps realize that you think your issue is CRITICAL and must be dealt with IMMEDIATELY. But, guess what, so does everyone else that submitted their ticket before you. Your CRITICAL ticket will be answered in the order received after everyone else's CRITICAL ticket has been answered.
5. Do not try to "bump" your ticket Making continuous replies to your ticket in an event to get a faster response won't work. In fact, in most common helpdesk applications, each reply made rotates the ticket to the bottom of the queue. So really, by bumping your ticket, you're just making yourself wait longer. Not getting service fast enough? Contact the manager of the company!
6. Include all relevant information, but only relevant information Seriously - we don't care to hear your life story. Submit your ticket with your client ID, domain name, username, password, error messages, steps to reproduce, and other information directly pertinent to your issue. If your website is inaccessible, check http://www.downforeveryoneorjustme.com/ and include your local IP address (from www.whatismyip.com) and a traceroute. That will save you a reply.
7. Just because YOU can't see the website does NOT mean the server is down So please - don't come shouting at us claiming we're fraudsters and have horrible uptime and demand a credit. Most of the time you will find there is either a firewall issue or a routing issue - or scheduled maintenance. Check http://www.downforeveryoneorjustme.com/ and your host's forums before screaming at them.
8. Avoid live chat & phone support Unless you have a quick question, live chat and phone support are probably not going to be good avenues. Chances are, if your issue requires someone to login to the server to investigate, you're just going to be escalated to a support ticket. Instead of whining about how long the support ticket will take to get answered - just get it in queue. Figure if you spend 5-10 minutes on the phone only for them to tell you that you need to submit a ticket - that's 5-10 minutes that your ticket could have been looked into. Think about it. If you do call or chat - be brief - and keep in mind we have other customers to help.
9. We don't make the rules If you don't like a company's policies or procedures, don't complain to your support tech about it. They don't make the rules, they just follow them. If you want a change, contact the management of the company.
10. Do NOT disrespect or mistreat support people If you curse at us, disrespect us, or mistreat us in any way - you can almost be guaranteed that we won't be going out of our way to help you beyond the minimum. By polite, cordial, and courteous to your support tech and it will get you a LOT farther. We don't get paid enough to deal with people's abuse.
11 (Free bonus ). The amount of money you pay does not matter to us Seriously - the fact that you pay us $9.95/month does not matter to us. We're going to provide you with the same support that we provide somebody that's paying $3.95/month or $99.95/month. Don't expect better treatment based on the amount of money you pay.
I've been working in this industry for 5 years now. Over the years, I've come to realize the little things that customers do that REALLY piss tech support off. This is a guide for customers for 10 things NOT do when contacting their host's technical support team.
Please forgive the brutal honesty. It's for your own good.1. One ticket per issue.
Emailing your issue to Support, Sales, Billing, Abuse, the owner, each individual tech, and the mayor of your town is not going to get your ticket answered any quicker.
Additionally, opening 2, 3, 4, or 10 tickets isn't going to get things done any faster.
Seriously - all it will do is irritate the support guy 2. Contact the proper department If your account is suspended due to non-payment, or your account hasn't yet been setup, or you want to upgrade your account - please don't bother contacting support hoping it'll get done faster. All it will do is slow down their response time to customers that have actual support issues. Billing issues goto Billing. Sales issues goto Sales. Abuse issues goto abuse. Get the picture?3. Contact support via ONE medium
If you put in a support ticket, don't get on live chat and call too. Trust me - you'll get the same answer on live chat and the phone as you will in the ticket . Same goes for requesting "updates" on your ticket - if your ticket is in queue, wait patiently for a response. If you don't get a timely response, contact the management to complain.4. Everyone thinks their ticket is CRITICAL
Tech support reps realize that you think your issue is CRITICAL and must be dealt with IMMEDIATELY. But, guess what, so does everyone else that submitted their ticket before you. Your CRITICAL ticket will be answered in the order received after everyone else's CRITICAL ticket has been answered.5. Do not try to "bump" your ticket
Making continuous replies to your ticket in an event to get a faster response won't work. In fact, in most common helpdesk applications, each reply made rotates the ticket to the bottom of the queue. So really, by bumping your ticket, you're just making yourself wait longer. Not getting service fast enough? Contact the manager of the company!6. Include all relevant information, but only relevant information
Seriously - we don't care to hear your life story. Submit your ticket with your client ID, domain name, username, password, error messages, steps to reproduce, and other information directly pertinent to your issue. If your website is inaccessible, check [url] and include your local IP address (from www.whatismyip.com) and a traceroute. That will save you a reply.7. Just because YOU can't see the website does NOT mean the server is down
So please - don't come shouting at us claiming we're fraudsters and have horrible uptime and demand a credit. Most of the time you will find there is either a firewall issue or a routing issue - or scheduled maintenance. Check [url]and your host's forums before screaming at them.8. Avoid live chat
setting up redirects in IIS to maintain existing links that are prominent in search engines.
current site is ASP and generally pages are accessed without requiring the default.asp to be specified, however site stats show many URLs with the default.asp used to access the page. The new site pages will be ASPX.
my query is would both
root/folder/folder/
and
root/folder/folder/default.asp
need to be redirected? or just the latter?
i believe that as long as IIS is configured to recognise default.aspx then the folder access would work as it does for default.asp at the moment...
but my understanding is that - root/folder/folder/default.asp - would need to be redirected to - root/folder/folder/default.aspx - or whatever page name was assigned to this page...
can anyone elaborate on this and the best way to handle redirects in IIS?
I have a question concerning the redirection of URLs. One of our customers has 1 main website (www.x.com) and many subsites (www.y.com, www.z.com etc.) which all end up at the same IIS instance. There, a CMS picks up the URLSs and directs them to the place the user requested.
Now, our customer wants all subsites to enter at the main site/subsite, instead of letting the routing be done bij the CMS. One solution would be to let our DNS hoster put URL redirects on all subsites. This however is not a valid option for us, since it's untransparant to us.
Another option would be to create a separate IIS website for every subsite and redirect these sites to the main site/subsite. That would mean redirecting www.y.com to www.x.com/y and www.z.com to www.x.com/z. This is not a very professional solution though.
We're running a VBulletin forum. I've been able to put basic redirects in place. But I'm fuzzy on how to direct links/search engines for forums/threads to the new location.
I've set up some subdomains up in cPanel thinking that that would automatically change any url from www.domain.co.uk/test to test.domain.co.uk.
I know these are the same thing but I would like it so that if something links to or type in the address bar www.domain.co.uk/test then the address bar displays test.domain.co.uk.
I am getting a problem that after my reseller client's clients sign in to their cpanel they see server.myhostname.com url in their address bar. This started after upgrading to cpanel 11 yesterday
I have these options set in whm:
** When visiting /cpanel or /whm or /webmail WITHOUT SSL, you can choose to redirect to:
Origin Domain Name
** When visiting /cpanel or /whm or /webmail with SSL, you can choose to redirect to:
SSL Certificate Name
Webmail is extremely slow as well for some reason.
I have spend 6 hours in the last 24hrs hand coding 300 lines of Permanent Redirects. I am moving my site from flat file (PHP with includes) to Drupal. I was going to drop it into the .htaccess file but am wondering if there is a more efficient place to put it since this is permanent. Should it go into the httpd file/Virtual host file, will cPanel over-ride that file?
I just went with Steadcom's VPS and they are great. I am setting things up and it's going pretty well, I have to dust off my linux/server knowledge that I haven't used in a couple of years.
Anyway I'm creating a virtual host.. I will have about 10 in the end, but right now I only have one domain IP Pointing to my new server. My registrar is NamesDirect.
When I create the virtual host, I can no longer access subdirectories directly. My Virtual Host directory is, say, /var/www/html/newdir
If I try to reach http://www.domainname.com which has been configued as a virtual host, that comes up correctly from the directory /var/www/html/newdir and works fine.
But if I try to reach http://myipaddress/newdir I get a 404 page not found error. Looking at the log, it's trying to reach /var/www/html/newdir/newdir so it's putting in the virtual host redirect even for just hitting the subdirectory directly.
Is this normal? Do I have something configured wrong? I have another domain that I have changed to IP Point to the VPS but until it propogates I won't be able to test having 2 virtual hosts.
Also.. I have not set up DNS on my VPS. I don't really understand it, and IP Pointing has always worked for me when I ran my own server form my home so I was just going to do that. But I wonder if this could be one of the problems.