Solved

XAMPP and IIS servers running together

Posted on 2010-11-26
21
740 Views
Last Modified: 2012-08-14
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

http://mysitename

Is this possible ? how??


Thanks!!
0
Comment
Question by:TonyReba
  • 9
  • 7
  • 3
  • +1
21 Comments
 
LVL 3

Expert Comment

by:David Brennan
Comment Utility
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.
0
 
LVL 3

Expert Comment

by:khuphuc
Comment Utility
hi,

 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.


0
 
LVL 9

Author Comment

by:TonyReba
Comment Utility
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>>???
0
 
LVL 3

Expert Comment

by:David Brennan
Comment Utility
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?
0
 
LVL 3

Expert Comment

by:khuphuc
Comment Utility
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,

0
 
LVL 3

Expert Comment

by:David Brennan
Comment Utility
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.
0
 
LVL 9

Author Comment

by:TonyReba
Comment Utility
thedavil;
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
http://sitename/foldername/
and access this joomla site,   and NOT have them type:
http://sitename:8080/foldername/

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

http://sitename/index.aspx

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,



0
 
LVL 3

Expert Comment

by:David Brennan
Comment Utility
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.

Eg.
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.
0
 
LVL 9

Author Comment

by:TonyReba
Comment Utility
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????
0
 
LVL 3

Expert Comment

by:David Brennan
Comment Utility
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.
0
Free book by J.Peter Bruzzese, Microsoft MVP

Are you using Office 365? Trying to set up email signatures but you’re struggling with transport rules and connectors? Let renowned Microsoft MVP J.Peter Bruzzese show you how in this exclusive e-book on Office 365 email signatures. Better yet, it’s free!

 
LVL 9

Author Comment

by:TonyReba
Comment Utility
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
http://servername/site2

Do you have any idea on how to configure this on apache?
0
 
LVL 3

Expert Comment

by:David Brennan
Comment Utility
I'm starting to think this question is a bit beyond me...

However, a really easy option would be to simply use an iframe
http://roshanbh.com.np/2008/04/hide-url-display-same-url-website.html

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.
0
 
LVL 9

Author Comment

by:TonyReba
Comment Utility
would it be easier to change seetings on IIS , and leave joomla sites defaulting to port 80??
0
 
LVL 3

Expert Comment

by:David Brennan
Comment Utility
What Tony says makes sense but unfortunately if you want to have

http://server/site1
and
http://server/site2

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)
0
 
LVL 11

Expert Comment

by:bansidhar
Comment Utility
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)
0
 
LVL 9

Author Comment

by:TonyReba
Comment Utility
Sounds great. Hopefully you can find it and share
0
 
LVL 9

Author Comment

by:TonyReba
Comment Utility
HI bansidhar, could you find your code?
0
 
LVL 11

Expert Comment

by:bansidhar
Comment Utility
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

</VirtualHost>

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
0
 
LVL 9

Author Comment

by:TonyReba
Comment Utility
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)

?
0
 
LVL 11

Accepted Solution

by:
bansidhar earned 500 total points
Comment Utility
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
0
 
LVL 9

Author Closing Comment

by:TonyReba
Comment Utility
got it
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
OfficeMate Freezes on login or does not load after login credentials are input.
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now