Forum Moderators: phranque

Message Too Old, No Replies

apache configuration equivalent to IIS

apache config

         

linux_admin

8:19 am on Jun 16, 2014 (gmt 0)

10+ Year Member



Hi All,

I am new to this forum.I am currently working on a migration project where we r porting our windows IIS(ARR) to linux apache.Below is config file for IIS Application request routing.Anyone can help to get equivalent apache configuration for below ..Thanks


<rewrite>
<globalRules>
<rule name="CAST" stopProcessing="true" patternSyntax="ECMAScript">
<match url="((^((video|audio)/.*$))|(^(video|audio)$))" />
<action type="Rewrite" url="http://CAST/{R:0}" />
</rule>
<rule name="WEB" stopProcessing="true" patternSyntax="Wildcard">
<match url="*" />
<action type="Rewrite" url="http://WEB/{R:0}" />
</rule>
</globalRules>
</rewrite>


<webFarms>
<applicationRequestRouting>
<hostAffinityProviderList>
<add name="Microsoft.Web.Arr.HostNameRoundRobin" />
<add name="Microsoft.Web.Arr.HostNameMemory" />
</hostAffinityProviderList>
</applicationRequestRouting>
<webFarm name="CAST" enabled="true">
<server address="127.0.0.1" enabled="true">
<applicationRequestRouting httpPort="82" />
</server>
<applicationRequestRouting>
<protocol>
<cache enabled="false" queryStringHandling="NoCaching" validationInterval="00:00:00" />
</protocol>
</applicationRequestRouting>
</webFarm>
<webFarm name="WEB" enabled="true">
<server address="web.blr.in" enabled="true">
<applicationRequestRouting httpPort="80" />
</server>
<applicationRequestRouting>
<protocol>
<cache queryStringHandling="Accept" enabled="false" validationInterval="00:01:00" />
</protocol>
</applicationRequestRouting>
</webFarm>
</webFarms>

linux_admin

5:23 am on Jun 20, 2014 (gmt 0)

10+ Year Member



anyone can help.....

lucy24

6:36 am on Jun 20, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



We're not ignoring you, honest. We need someone who is bilingual in Apache and That Other Server. Even people who speak Apache alone are thin on the ground.

Now, if you can hammer out everything else on your own, and just need help fine-tuning some rewrites and/or redirects...

not2easy

7:12 am on Jun 20, 2014 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



There are a few IIS people around here, they just haven't seen this yet, sometimes folks are just a little busy, your title should get them in here.

linux_admin

10:38 am on Jun 23, 2014 (gmt 0)

10+ Year Member



Thank you for your support..I am awaiting for IIS seniors to look my title.

lucy24

3:44 pm on Jun 23, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



:: detour to check ::

Oh, no wonder I couldn't find the IIS subforum. It isn't here; it's under Microsoft. Investigations continue.

not2easy

6:34 pm on Jun 23, 2014 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Yes, it occurred to me there may be more help from the IIS Forum only because there might be more IIS/Apache bilingual than Apache/IIS bilingual users.

lucy24

8:51 pm on Jun 23, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Option B, which I think I've suggested before, is simply to set aside the whole IIS issue. Go back to the beginning, work out in English what you want to achieve, and then proceed directly from there to Apache-speak. It's really no different from saying something in two unrelated human languages. If you know what you want to say, you can express it separately in each language, rather than translating from A to B and winding up at two removes from your original thought.

Kendo

11:02 pm on Jun 23, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



For IIS server configuration is managed by the IIS Manager. Management is usually managed from its GUI rather than editing a file. That way errors are avoided.

That will govern defaults that apply to all sites and then each site can be configured differently using additional options. In Windows 2003 Server that was quite straight forward but Windows 2008 Server is different again and slightly more complex in that any modifications from the server default end up in a web.config file of the site's root.

Individual sites can be set for 32 or 64 bit applications and one has to be careful here because if you allow 32-bit apps then the site's database connection also needs to be 32-bit even though your server may be 64-bit.

There are lots of pitfalls and quirks to avoid, so always manage config using the IIS manager GUI which will ensure that config options are correct and supported... at least until you can get the site online.

Oh, forget mod-url-write. While it is possible to run WordPress on a Windows server by installing PHP, MySQL and other Linux applications that have been ported for Windows, I found that it caused many problems, especially when site developers try to use it as a normal linux scenario... file permissions can get totally screwed resulting in dead files that cannot moved, deleted or edited.

phranque

12:01 am on Jun 24, 2014 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld, linux_admin!


i think lucy24 has the right idea.
you should describe all the details of what your IIS config entails as that will be the specification for your apache config requirements.

Ocean10000

12:45 am on Jun 24, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Based on my reading of the config fragments we possibly have two web servers running on a single machine(, in a web farm with identical configurations), in a shared hosting environment.

(1) on port 80 (IIS)
(2) on port 82 (Other web server)

I am guessing the second webserver only handles a streaming content of some sort.

If I am reading this correctly. What the configuration does is certain urls on port 80, are redirected(proxied) to port 82 and the other webserver but served up using a url pointing to port 80.

linux_admin

7:33 am on Jun 24, 2014 (gmt 0)

10+ Year Member



We have two web servers running on windows 2012 server using IIS.

1.edg
2.web

Access URL is http://edg.com(edg server-localhost)

If URL matches "((^((video|audio)/.*$))|(^(video|audio)$))" then it will direct to localhost(edg server-listen port 82)
IF URL matches * then it will redirect to second server(web server-listen port 80).

Sorry for my bad english.I am not native english speaker.

[edited by: phranque at 10:42 am (utc) on Jun 24, 2014]
[edit reason] unlinked url [/edit]

lucy24

6:37 pm on Jun 24, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



((^((video|audio)/.*$))|(^(video|audio)$))


Wouldn't that collapse to
^((video|audio).*)
?
Otherwise you're excluding the specific form
(video|audio)/
which is surely a valid URL, or at least a valid redirect pattern.

When you say "redirect" do you mean redirect-- i.e. the user-agent is instructed to make a fresh request for a different URL --or do you actually mean rewrite/proxy-- i.e. the site serves content from elsewhere? (rewrite ordinarily, proxy if it involves a different server and/or hostname)

linux_admin

5:36 am on Jun 25, 2014 (gmt 0)

10+ Year Member



Thanks lucy24:

I mean rewrite/proxy..

linux_admin

7:35 am on Jun 26, 2014 (gmt 0)

10+ Year Member



Thanks to everyone.
In IIS,there is a option to keep server farms.how to achieve the same in Linux Apache? Thanks