GeneralThis forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am configuring my system to become a server, since I'm new to this stuff I there are still many things that I don't know yet.
My question was how will I redirect my server for example I will type in http://mail.myserver.com/ then only the page where my mail page will display and not the default page or I will type in http://www.server.net/ then the default page will be the one to load.
I just want to know what is the configuration or module that I need to enable if there is any.
I don't follow your question. Are you trying to setup multiple Apache servers? Or virtualhosts on one server or are you having DNS problems? A bit more info please!
No I'm not trying to setup multiple apache and I don't have problem with my dns.
OK I will restate my question, I will write http://main.myserver.com/ then the frontend for my mail will be display ok, then I open again another browser and type http://www.myserver.net/ then the default page will be the one to be displayed right, but then I don't know how it will be done, you wrote about virtualhost then how will it be done.
Originally posted by ethanchic I will write http://main.myserver.com/ then the frontend for my mail will be display ok, then I open again another browser and type http://www.myserver.net/ then the default page will be the one to be displayed right, but then I don't know how it will be done, you wrote about virtualhost then how will it be done.
Originally posted by Noerr just put two virtual hosts in your apache config file
To expand a little on Noerr's response.
If you do want do what I've asked in my last post then yeah you just use a virtual host on Apache, and have a CNAME entry in your DNS to point name lookups of www.myserver.net to main.myserver.com. There's another active thread of the forum that is covering this at the moment. Have a look at http://www.linuxquestions.org/questi...ght=httpd.conf
I already done all the things you suggested but then still the default page came out.
This are the following what I have configured
Listen set to 192.168.19.5:80
BindAddress set to 192.168.19.5
NameVirtualHost set to 192.168.19.5
ServerAlias set to
<VirtualHost 192.168.19.5>
ServerName www.server.net
ServerAlias mail.server.net
</VirtualHost>
VirtualHost set to
<VitrualHost 192.168.19.5>
DocumentRoot /usr/local/apache/htdocs/
ServerName www.server.net
</VirtualHost>
<VirtualHost 192.168.19.5>
DocumentRoot /usr/local/apache/mail/
ServerName mail.server.net
</VirtualHost>
What else wrong with my configuration please help
So from the command line of your server and from whatever machine you are trying to load the page on you can ping www.server.net, and it returns the correct address yeah?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.