Link to home
Create AccountLog in
Storage Software

Storage Software

--

Questions

--

Followers

Top Experts

Avatar of belranjan
belranjan

apache virtual server configuration
I want to know how to configure virtual server with same ip and same port


For eg i want to configure a site

1 With ip 10.0.0.1  port 80 . Directory path \var\www\html\test
2 With same ip and same port . But different directort path \var\www\html\test2

In ie browser. I need to access the web site1 as http://10.0.0.1/test, and
Web site2 as http://10.0.0.1/test2

I windows I can configure this type.But in apache how to configure.                                                

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of samrisamri🇲🇾

Hi belranjan,

Welcome to EE.

You could take a look at Apache website for more information on how to do VirtualHosting;

http://httpd.apache.org/docs-2.0/vhosts/
You may take a look at http://httpd.apache.org/docs-2.0/vhosts/examples.html for some examples.

However, looking at your initial requirement, you do not have to do virtualhosting at all, take a look at mod_alias (http://httpd.apache.org/docs-2.0/mod/mod_alias.html and http://httpd.apache.org/docs-2.0/urlmapping.html ) to enable mapping of physical folder to a different webspace.

Infact, based on your example; it is as simple as creating a different directory under \var\www\html\ folder, and name the folder as "test" and "test2" accordingly.

Please give the suggestion a try, and let us know the status.

Cheers,


Avatar of belranjanbelranjan

ASKER

I know if it is directory browsing.In my concern i hosted a site

1. At 10.0.0.1 port 80 webmail is running .So from client side if they type 10.0.0.1 it goes to webmail page directly.If I want configure another virtual website on same ip and same port it gets conflict eachother. I don't want to configure namebased virtual server.

Avatar of samrisamri🇲🇾

hi belranjan,

what you wish can only be done with named based virtual hosting (IMHO).  If you want to stick with this configuration -- webmail running on port 80, you may not be able to install/start apache at all since both would attemp to bind to port 80/TCP, and only one would managed to start (depending on which service is started first).

Back on webmail; does this runs on apache too?

If this is the case, you may need to consider the virtualhosting.  Just ensure that you create 2 vhost - 1 for webmail, and the other for web.  if you still need to access the server by the IP address, the VirtualHosting should work for that -- just use 10.0.0.1 in the ServerName directive for the webmail; and use different name for the 2nd vhost.

what do you think?

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


I can't use name based because it is in public ip .Not in intranet .If it is in intranet we can give name based. Since I have to browse from Internet the name based will not resolve. Only the ip will resolve. Since web mail is running in apache if we type an ip itself web mail will open. What your idea regarding this issue.

ASKER CERTIFIED SOLUTION
Avatar of samrisamri🇲🇾

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account
Storage Software

Storage Software

--

Questions

--

Followers

Top Experts

The term "Backup" means the methods and processes involved to copy computer data (system data as well as application data) to media other than the ones where the data originally live (disk, tape, optical, cloud). "Restore" in turn means the methods and processes involved in data recovery, i. e., bringing back copied computer data to their original location. Backup/Restore primarily serves as a means of protection against data loss, be it due to disaster, corruption or sabotage. It can also be used for recovering data from an earlier point in time and even for cloning machines or applications. There is a wide variety of backup/restore software available, from expensive commercial products to free or open source tools.