Webserver
Hi,
I have one webserver in my office. apache and lighthttpd running. two websites running on that server. One websites running under apache another is running through lighthttpd. can anyone tel me second websites running though lighttpd with port number 81. if it is possible to runnign this websites without port number.like this. www.example.com:81 to www.example.com. please help me. Thanks |
Hi,
Yes. You can setup the example.com vhost in apache and configure it as a reverse proxy for the x.x.x.x:81 webserver (that is the IP of the lighttpd listening on port 81) Regards |
forward http to whatever port you want. I think that would be the solution.
|
webserver
Quote:
Thanks for the reply. In this case the both websites running one website running through apache and the another one running through lighttpd without port number. so how i do this please help me. I am using centos5.5 Thanks |
two web servers on one machine
First, understand that two programs cannot share the same port on the same interface. You either need to virtualize/forward for one to a different port (see suggestions above) or have more than one IP address on this machine (with different DNS names for the IP addresses). There are several different ways you could go here.
Being a network engineer, I go with modifying the networking settings and configuring for the change. This is a bit complex on one end, but makes the web-server configurations very straightforward. A very webby software kinda guy would probably rather configure the first web server to forward traffic to the other (on a different port - 81 perhaps) based upon the name used in the URL. This requires NO network change, requires duplication of the DNS address (minor), and slightly more complex web-server configuration. A very 'Virtual' kinda guy might say move BOTH of these web-servers to virtual guests (using LXC or OpenVZ perhaps) and give each its own IP address and DNS name and stop worrying. (Because then the stock off-the-shelf configurations would work! Sounds like fun.) Which solution appeals to you more, or sounds like something you would be more likely to enjoy? |
webserver
Quote:
Hi Thanks for the reply. I think my questions is not clear. sorry. I have 2 websites running in the one webserver. first websites running through apache with port number 80. another websites running through lighttpd with port number 81. all its working fine . I want when i browse second website without port number(81). but now its working with port number (81). how I do this. please any help. default apache runs without port number. Thanks |
I think I understand your question. You have two websites (abc.com and def.com, for example). You want to be able to access both websites without having to specify the port number, right?
In order to do this you need to run both websites on port 80. When you go to a website like google.com, the browser automatically appends the :80 to the end, because that's the default HTTP port. A user's browser trying to locate def.com won't know to use :81 because it's not a standard HTTP port. So with your current setup there is no way to achieve your goal. The solution to this is called Name Based Virtual Hosts (vhosts) as wpeckam mentioned. Your best bet is to run both websites in Apache as virtual hosts instead of running two HTTP daemons. Apache will look for the user's request to see whether it should load abc.com or def.com. Detailed info can be found at Apache's website. Hope this helps. |
webserver
Quote:
You are correct. But I know that both website running through apache with port 80. but in this case I need separate website setup for one is through apache and another through lighttpd in one server. is it possible to run website through lighttpd without port number. Please any solution. Thanks |
Quote:
|
Quote:
|
You can configure your NIC with 2 IP addresses. Let apache listen on the one and lighttpd on the other; both can now use port 80.
|
All times are GMT -5. The time now is 11:45 PM. |