Linux - EnterpriseThis forum is for all items relating to using Linux in the Enterprise.
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.
after setting up apache on Enterprise Linux (CentOS). i configured 2 additional virtual hosts (name based virtual hosts) - vh1 and vh2 which is in addition to the default virtual host. (total of 3). all in one ip addresse. now in the document root directory i further created sub folders for the 3 virtual hosts and dumped seperate html files on them.
but the problem is that during test, from my browser i can only access the default virtual host. the other two remains unreachable.
i'm suspecting port mapping 'cos the default virtual host is mapped to port 80 and the other two are mapped to port 7040 and 7045. now in the HTTP configuration window->Main tab, if i add additional ports, when i want to restart the httpd service it will fail; displaying an error and refering me to the additional added ports.
the question is how do i simply get additional (name based) virtual host well configured up and running?
thanks for your advice. i tried it but the thing is that in the html document folders of these virtual hosts i have simple web site i dump inside each of them. (index1.html, index2.html and index3.html respectively). so when i run the test on my browser for example:
HOSTNAME/index1.html (which is the default virtual host)
i hit it succesfully. But when i enter:
HOSTNAME/index2.html or HOSTNAME/index3.html
an error comes up saying: "The requested URL /index2.html was not found on this server"
i've tried all i can i just cannot get to the second and third virtual hosts from my browser.
whats the way out?
I'll ask again - why are you port mapping rather than using the default port 80? I've run a couple of virtual hosts, similar to what you describe without resorting to odd ports
frankkky,
billymayday is right, you do not need to use the other ports, the virtual hosts will all work on port 80.
There is only one reason to use port mapping for virtual hosts, that is to enable ssl certificates for the hosted domains, when you only have one ip address available.
[ ssl is ip based, not name based, so ports will enable domain specific certificates with only one ip ]
yeah Billymayday, sorry i forgot to tell you that i've alredy followed your instruction and set all the ports to port 80 (this is even before my second post). still the problem is not solved.
i even took further steps; now to configure only the default port to port:80 and left the additoinal vh1 and vh2 with no port numbers. still the problem remains.
yeah Billymayday, sorry i forgot to tell you that i've alredy followed your instruction and set all the ports to port 80 (this is even before my second post). still the problem is not solved.
i even took further steps; now to configure only the default port to port:80 and left the additoinal vh1 and vh2 with no port numbers. still the problem remains.
Well if you wanted the other virtual hosts on different ports, did you specify Apache to listen on those ports?
Can you post an example output of your virtual host setup/config here?
yes trickykid, i tried to specify apache to listen to other ports. but the problem is that after adding additinal ports, when i try to restart http deamon it will fail to start, will come up with error message refering me to the additoinal ports i added (just as i mentioned in my first post) and when i go back and remove those ports it can now be restarted.
please note that i did all my configuration via the HTTP graphic interface tool, not the ../httpd.conf file.
ok. below is the my configuration as it appeared in the ../httpd.conf file (the Vitual Host Section):
Listen *:80
ServerName www.myweb.com
UseCanonicalName on
# Use name-based virtual hosting.
NameVirtualHost 192.168.1.10
# Where do we put the lock and pif files?
LockFile "/var/lock/httpd.lock"
CoreDumpDirectory "/etc/httpd"
hi i am rakesh
i use linux 9. i want to share bandwidth.it possible or not
i have two wan. i want to combined banwidth with use local network
or
if one one wan is down then other wan is activited.
how i can do.
please write us
thank
hey Rakesh please open a new tread for your topic. i dont want you to divert attention from mine.
yeah trickykid, you see; i did exactly what you say but i still cant reach vhost2 and vhost3. it happens that if i assign ip address with or without port number to vhost1 then i can only see vhost1 on the browser and never others.
if i do so to vhost2 i will only see vhost2 on the browser and never others.
the same happens on vhost3.
but then if i assign ip address or asterisk (*) to all of them with or with out port number. i can only see the first vhost and never others.
the way out please?
hi i am rakesh
i use linux 9. i want to share bandwidth.it possible or not
i have two wan. i want to combined banwidth with use local network
or
if one one wan is down then other wan is activited.
how i can do.
please write us
thank
rakesh_jims,
You have been previously warned about hijacking threads. If you continue to hijack threads that have nothing to do with your questions, you will lose privleges to this site. If you have any questions or comments, contact the forum administrator. So I'd like to ask you once again, start your own "New Thread" for your own question and stop clicking the "Reply" opn threads that don't even relate to your question. Abuse it and you'll lose it!
Quote:
Originally Posted by billmayday
Frank, post the VirualHost settings from your httpd.conf
He already posted his virtual host settings from his httpd.conf
hey Rakesh please open a new tread for your topic. i dont want you to divert attention from mine.
yeah trickykid, you see; i did exactly what you say but i still cant reach vhost2 and vhost3. it happens that if i assign ip address with or without port number to vhost1 then i can only see vhost1 on the browser and never others.
if i do so to vhost2 i will only see vhost2 on the browser and never others.
the same happens on vhost3.
but then if i assign ip address or asterisk (*) to all of them with or with out port number. i can only see the first vhost and never others.
the way out please?
And I'm assuming you have proper DNS setup/configurations for these other virtual hosts?
please kindly explain to me how to go about the DNS configuration in this scenerio, i've heard that DNS should come into play here, but how? please explain to me.
by the way i have DNS service running in a w2k3 server (the D.C) in the same local network. therefore i did not configure this apache server (Enterprise Linux 4) to run DNS service.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.