Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 813
  • Last Modified:

XAMPP and IIS servers running together

Hello guys , happy thanksgiving,

I have a question and I thought that someone would know the answer,

I have a server running windows server 2008 and IIS 7, now I want to deploy and host a joomla site in there,  I downloaded and set up everything, but the issue is that IIS uses default port to web applications ( 80) and apache wont start if using same port so I changed to 8080,

Now my question is, since this is going to be an intranet web site in my company, how can avoid typing http://sitename:8080/foldername/

and have only


Is this possible ? how??

  • 9
  • 7
  • 3
  • +1
1 Solution
David BrennanSenior Integration EngineerCommented:
Sounds like DNS forwarding could be your best bet. Unfortunately I'm not an expert in that field but I would imagine you can setup an entry on your DNS servers to forward the above.

 if you site is on xampp you have to shutdown or move the iis default port

Microsoft Internet Information Services 7.0
Open Internet Information Services (IIS) Manager.
Select the Web site that you wish to configure.
In the Action pane, click Bindings.
Click Add to add a new site binding, or click Edit to change an existing binding.
Click OK to apply the changes.

TonyRebaAuthor Commented:
Hi khuphuc ,

Yes, my site is running on xampp, but had to chnage to listening port 8080 , otherwise it will not start apache,  now i did not quite get the last part,

This server is going to be used for host both joomla pages and aspx (asp.net pages) so it is important to keep the functionality for both, so the issue I am having is that I have to use the port specification to access the site, and I want to avoid this?

What would be the steps to access to it without specifing the port>>???
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

David BrennanSenior Integration EngineerCommented:
Actually it sounds like something a Reverse Proxy could help. or how about a META HTTP redirect ? am I right in saying you want one site to appear to internal people and a different site to external visitors, but they all use the same web address as such?
you have to considerate two schenario apache and the apache config site, try to do this, stop iis with the command

iisreset stop (i hope that 2008 have it)

the try to load apache if it's work you have to control that your apacha and apache config site been moved of the tcp 80 port,

David BrennanSenior Integration EngineerCommented:
To re-phrase / delete my previous question - Do you want both sites to host on port 80 ?

i.e. if somebody puts in http://hostname:80 they get the IIS server but if they just put in http://hostname then they get the Apache one ?

I'm sorry about the internal / external question - I got confused with another question I'm currently commenting on.
TonyRebaAuthor Commented:
to your question:
am I right in saying you want one site to appear to internal people and a different site to external visitors,?

This site will be only accessible internally, by employees using the intranet network . So , I need them to enter
and access this joomla site,   and NOT have them type:

conflict as I mentioned is that there is some other asp.net web sites hosted that use port 80, these sites can be accessed by using


can I have both asp.net and php sites  acessesd by
http://sitename/foldername/  (NO 8080)

Sorry for any misundertanding , my enlish is not very good,

David BrennanSenior Integration EngineerCommented:
Ok. It would be impossible for http://sitename/foldername/ point to both as such, unless there's some criteria for doing it. i.e. the server has to have some way of knowing what the user wants.

It's easy to have http://sitename/foldername/index.aspx point to the IIS and http://sitename/foldername/ point to the Apache using a HTTP Meta redirect,

but if there's some way of distinguishing which machines to connect to IIS and which ones to send to Apache, then you can write in some clever code to forward to either / or.

I'm not sure if I'm making sense here.
TonyRebaAuthor Commented:
so, I have this two sites:

site 1 in IIS
folder c:\inetpub\site1\index.aspx

site 2 on Xampp
folder c:\xampp\site2\sitename2\index.php

to access first site i use
http://servername/site1  and it works

how can I type
http://servername/site2   and have it working????
David BrennanSenior Integration EngineerCommented:
if you want it to redirect so that people can put in servername/site2 and it just does a simple HTML redirect it's easy to set it up but the problem is the URL will then change to the http://servername:8080/ - but I'm presuming you want it to always say like http://servername/site2/parta  and http://servername/site2/partb and continue to forward back. if however you're not worried about how the URL looks to the user after they get in then I can give you simple HTML to redirect from one to the other. Otherwise we're talking about finding an IIS equivalent to Htaccess - I'm much more familiar with the Apache end of things. Let me know anyhow and I should be able to help as best I can.
TonyRebaAuthor Commented:
Yes, I would like to have

well as long as the url never shows port , example 8080 ,

so i can give users a link like

Do you have any idea on how to configure this on apache?
David BrennanSenior Integration EngineerCommented:
I'm starting to think this question is a bit beyond me...

However, a really easy option would be to simply use an iframe

That would hide the actual URL and then the user could navigate around the site no problem, and never see the port in the URL. As long as the user didn't want to change the URL manually that would work fine. iframes have their limitations but if it's just PC(s) with modern browser(s) you should be fine. I really should set up IIS and do some testing for this and give you some concrete work.
TonyRebaAuthor Commented:
would it be easier to change seetings on IIS , and leave joomla sites defaulting to port 80??
David BrennanSenior Integration EngineerCommented:
What Tony says makes sense but unfortunately if you want to have


working off the same machine but with IIS and Apache serving each one seperately,
there has to be one or other workaround applied. It's definitely doable though. just trying to get my head round it today (I'm over-tired)
you can do it. but you have to change some configurations.
1. You have to make apache run on port 80
2. you have to move IIS to another port
3. You can now forward the requests using apache redirects

So apache will serve all the request for /site2 and work as a transparent router for all request to /site1

I have a running machine like this at office(don't have windows at home) where /server1 is served by apache and server2 is served by IIS. I have never checked this configuration with sub sites like server/site1 and server/site2.

I can get you some sample configuration later (~10-12hrs) when I get to my windows computer

Apache can work as a proxy (don't know much about IIS)
TonyRebaAuthor Commented:
Sounds great. Hopefully you can find it and share
TonyRebaAuthor Commented:
HI bansidhar, could you find your code?
First sorry for the delay, had an accident in the family and was not able to get to a computer.

Here is what I have done. I created a virtual host for each sites i am running with other web servers

assuming site2 works on http://localhost:8080

the virtual host part is:

<VirtualHost site2>
ProxyPreserveHost On

ProxyPass         /  http://localhost:8080
ProxyPassReverse  /  http://localhost:8080


also you will have to enable mod_proxy in your httpd.conf file
LoadModule proxy_module
AddModule  mod_proxy.c

in apache 2 omit "AddModule" line

hope this helps. can reply soon now
TonyRebaAuthor Commented:
Hi sorry I did not notice you replied, so , how can I delete the port part (8080) and only leave my url as

servername/site1  (served on apache server)

servername/iis_site  (server in iis server)

if you are going to use only one server name then you won't need virtual host.

1 . configure your apache to serve servername/site1 as normal
easiest method configure Document root to be /servername so you get folder site1 as servername/site1

2. configure your IIS to serve iis_site on another port so you will get servername:8080/iis_site served by IIS

3. use the following configuration on the main block of httpd.conf
ProxyPreserveHost On

ProxyPass         /iis_site  http://servername:8080/iis_site
ProxyPassReverse  /iis_site  http://servername:8080/iis_site

What I am doing here is if apache gets a request to /iis_site it acts as a transparent proxy, just gets the page from your IIS server and send to you. So make sure http://servername:8080/iis_site is accessible from the machine running apache.

You can use any port to run IIS server if they are not used by another server. I don't prefer running IIS on 8080. if you install tomcat after some time on the same machine you may forget that IIS is using that port and get into trouble.

I also prefer using different domains/subdomains for each site, but that is just my preference (no additional advantage)

hope this helps
TonyRebaAuthor Commented:
got it

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 9
  • 7
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now