Configure two or more Web Servers on the same IP

Depending on the network topology necessary in each situation, it is possible to need a proxy or an HTTP request balancer, it is not necessary to have millions of requests for such a need, it can simply be because there are several web servers (IIS, Apache, Lighthttpd, …) and the intention is to hide this topology from the client by launching everything on port 80.

To do this we will configure a server that receives the requests and redirects them to the corresponding computer. First from Apache 2 the proxy module must be enabled, in Debian for example it would be:

Read more...

Map the SOAP definition of the WSDL

If for any reason you do not like the return of the WSDL that a Web Service provides us, don’t worry, everything can be modified. Thanks to an article by Christian Weyer, you can alter, as in this case, the URL that returns the label <soap:address location=http://www.tuURL.com /> or <soap12:address location="http://www.tuURL.com" />. Real cases in which the IIS answers through port 80 and the ports are mapped in the firewall, there are redirects,…..

Read more...

How IIS or Apache does not protect and how we insist on being vulnerable

A proposal for the new year, to be a little safer than we sometimes dare to practice, we all know truisms such as that our web server with .NET support will never allow us to serve certain files, such as any file within the bin directory, some such as web.config, and some more that we are never interested in having rescued, given that they usually contain compromised information.

Saving the connection strings in the web.config is an option used by everyone, given the ease of rescuing this information in our web application, and being able to port it from one server to another, but ……..

Read more...

Windows 2008 Beta 3, regaining trust

After several months of testing Windows Vista it once again gives me a similar impression to the one I got with Windows ME, a little better, but not much, I see it as unstable, a lover of killing applications, or causing them to commit suicide, and most importantly of inferior usability, I will never get tired of repeating “The Office guys should give usability lessons to the View.”

But I took a little time and tried Windows 2008 without a virtual machine, (I have just piled up 100 positive adjectives to describe it). It follows the philosophy of Windows 2003, which in my opinion is “Let’s make something that works.” Even though it is Beta, it has stability to mention, it is possible to enable almost all, if not all, the graphical functionalities of Vista, and above all IT IS VERY FAST!!!.

Read more...

Statistics in IIS

  1. Download awstats-6.6-exe (Latest stable < 1Mb)
  2. We download the Perl Interpreter, since AWstats is written in Perl (ActivePerl-5.8.8.820-MSWin32-x86.msi, 12.4Mb)
  3. We install Perl
  4. Next we install AWStats by default, especially activate the Path
  5. In the ISS administration, we went to properties on our website
  6. In the Website tab, configure like this:
  7. In Log properties, we must have at least these boxes checked:
  8. Regarding the frequency of saving logs, one day is enough.
  9. We apply the changes and restart IIS to be sure
  10. We go to the path where Awstats was installed (C:\Program Files\AWStats\)
  11. Once there we enter the path C:\Program Files\AWStats\wwwroot
  12. From here we copy the cgi-bin, icon, css folders to the path where you want to have it in IIS (I have put them in: C:\Inetpub\wwwroot\stats)
  13. We open the file with notepad: C:\Inetpub\wwwroot\stats\cgi-bin\awstats.localhost.conf (localhost, change it to the name of the site)
  14. From here we will make several changes:
  15. Change the LogFile parameter, to the path of your IIS log in my case I have set LogFile=”C:\WINDOWS\system32\LogFiles\W3SVC1\ex%YY-24%MM-24%DD-24.log”, just substitute your correct path, leave the rest the same.
  16. LogType=W
  17. LogFormat=2 If for strange reasons it does not work, you have the option of: LogFormat=“date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status sc-bytes cs-bytes “ or the fields you have marked
  18. DirIcons=”/stats/icon”
  19. SiteDomain=”localhost”
  20. A****llowToUpdateStatsFromBrowser=1 (if you set it to 0, Stats can be updated from a link)
  21. Once this has been changed, we save the file
  22. Now comes the good part, we create a .bat file, wherever we want, and place this:
  23. perl C:\Inetpub\wwwroot\stats\cgi-bin\awstats.pl -config=localhost -update perl C:\Inetpub\wwwroot\stats\cgi-bin\awstats.pl -config=localhost -output -staticlinks > C:\Inetpub\wwwroot\stats\index.htm
  24. Always replacing the path with yours and the name of your site with the correct one. When that bat is executed, the statistics will be updated
  25. We just need to schedule it as a scheduled task with the TaskManager, for example at 00:00 each night, so we will have it updated daily
  26. Let’s enjoy our statistics: http://localhost/stats/

As you may have seen, the statistics of our IIS are saved in the directory C:\WINDOWS\system32\LogFiles\W3SVC1\ so if anyone dares to make a small program or ASP.NET application that parses them, welcome. Thanks to wandering for the inspiration to put it together

Read more...