Sponsored Content
Operating Systems Linux Red Hat Apache question - virtual host related Post 302787911 by freebird8z on Sunday 31st of March 2013 11:24:15 AM
Old 03-31-2013
Apache question - virtual host related

Hi folks,

I recently read about Apache virtual host and was able to configure that as well. I used name based virtual host (lets say http://vhost1.example.com) and it worked just fine. Then I configured another named based virtual host on same apache server (lets say http://vhost2.example.com) and that worked too (ONLY after disabling first one i.e. vhost1). Otherwise it was showing homepage of first virtual host, if I dont disable the first virtual server.

My initial understanding says that there can be multiple active virtual hosts (name based) - but that doesn't seem to be the case. I know and learnt about precedence also and according to that first virtual web server will be default webserver.

My quesion is - how to enable all name based virtual hosts & is that even possible? If yes, could someone please provide a same config?

Cheers.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Apache virtual host

Would this be the correct entry for Apache to answer on the IP 129.250.242.126 if the servers IP is 129.250.242.125? Are any other changes necessary to get Apache to answer this IP for web traffic? < VirtualHost 129.250.242.126> ServerName www.my_domain.com ServerAdmin admin@my_domain.com... (4 Replies)
Discussion started by: 98_1LE
4 Replies

2. UNIX for Advanced & Expert Users

Resolving Aliases and Virtual IP's on a Host

I am currently going through the servers in our network and trying to compile a list of the current aliases for each box and any virtual IP addresses. I can check for the ones that are supposed to be there but how do I list the ones that I don't even know exist? ANY help would be greatly... (1 Reply)
Discussion started by: Scott Pullen
1 Replies

3. Solaris

Unix virtual host detection

I have a need to write scripts that can reliably determine the virtual host of a Sun Solaris system. (1 Reply)
Discussion started by: Meridian
1 Replies

4. Solaris

Unix virtual host detection

Is it possible to reliably detect the virtual host of a Sun Solaris box, within a shell or Perl script? Can a system have multiple virtual host or not host at all ? I was recently made aware of hostname command, but was not sure if this option was the only one available. Any help is much... (3 Replies)
Discussion started by: Meridian
3 Replies

5. Red Hat

Virtual Host Apache

Hi, I have set up the following virtual host but it cannot find the URL? Apache is running fine and I have disabled iptables. Within the document root I have the following file index.html displaying a sample text message. Any ideas what my problem might be? httpd.conf: ... (2 Replies)
Discussion started by: Duffs22
2 Replies

6. Solaris

Change hostID of Solaris 10 virtual/guest machine installed by Virtual Box 4.1.12 on Windows-XP host

Trying to set or modify the randomly set hostID of a Solaris 10 virtual/guest machine that I installed on a Windows-XP host machine (using Virtual Box 4.1.12). I was able to set/modify the hostname of the Solaris 10 virtual/guest machine during installation as well as via the Virtual Box... (4 Replies)
Discussion started by: Matt_VB
4 Replies

7. Red Hat

Apache virtual host config vs global config problem

Hi folks, I am trying to configure Apache webserver and also a virtual host inside this webserver. For Global server config: /var/www/html/index.html For virtual host config: /var/www/virtual/index.html Both client10 & www10 are pointing to 192.168.122.10 IP address. BUT, MY... (1 Reply)
Discussion started by: freebird8z
1 Replies

8. Web Development

Problems with Apache Virtual Host

I am attempting to add virtual hosts to an apache web server, which has this current configuration: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride None ... (27 Replies)
Discussion started by: Corona688
27 Replies

9. Solaris

Solaris 10 virtual - how do I tell physical host?

uname -a reports type Generic so I know its virtual. Assume its an ldom somewhere. How do I find out what physical host server is? (4 Replies)
Discussion started by: psychocandy
4 Replies

10. UNIX for Advanced & Expert Users

Apache Virtual host issue

Hello, I am facing a very strange issue while setting a virtual host on apache to setup multiple websites using separate IPs. Virtual host is setup but when i am browsing the website it display content under /var/www/html and displaying site1 and site2 folder instead of access the content... (2 Replies)
Discussion started by: sunnysthakur
2 Replies
asadmin-create-virtual-server(1AS)				   User Commands				asadmin-create-virtual-server(1AS)

NAME
asadmin-create-virtual-server, create-virtual-server - adds the named virtual server SYNOPSIS
create-virtual-server --user admin_user [--password admin_password] [--host localhost] [--port 4848] [--secure|-s] [--passwordfile file- name] [--terse=false] [--echo=false] [--interactive=true] --hosts hosts [--httplisteners http_listeners] [--defaultwebmodule default_web_module] [--state on] [--logfile log_file] [--property (name=value)[:name=value]*] virtual_server_id Creates the named virtual server. Virtualization in the Application Server allows multiple URL domains to be served by the same HTTP server process which is listening on multiple host addresses. If the application is available at two virtual servers, they still share the same physical resource pools. This command is supported in remote mode only. OPTIONS
--user authorized domain application server administrative username. --password password to administer the domain application server. --host machine name where the domain application server is running. --port port number of the domain application server listening for administration requests. --secure if true, uses SSL/TLS to communicate with the domain application server. --passwordfile file containing the domain application server password. --terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well- formatted data for consumption by a script. Default is false. --echo setting to true will echo the command line statement on the standard output. Default is false. --interactive if set to true (default), only the required password options are prompted. --hosts a comma separated (,) list of values allowed in the host request header to select the current virtual server. Each virtual server that is configured to the same connection group must have a unique hosts value for that group. --httplisteners optional; a comma separated (,) list of HTTP listener IDs. Required only for a virtual server that is not the default virtual server. --defaultwebmodule standalone web module associated with this virtual server by default. --state determines whether a virtual server is active (on) or inactive (off or disabled). Default is active (on). When inactive, the virtual server does not service requests. --logfile name of the file where the log has to be written to. --property optional attributes name/value pairs for configuring the connection pool. OPERANDS
virtual_server_id identifies the unique ID for the virtual server to be created. This virtual server ID cannot begin with a number. Example 1: Using create-virtual-server asadmin> create-virtual-server --user admin1 --password adminadmin1 --host pigeon --port 5001 --httplisteners http-listener-1 --defaultwebmodule simple --state on --logfile server.log --property User=admin:Password=admin --hosts sample1,sample2 sample_vs1 Command create-virtual-server executed successfully Where sample_vs1 is the virtual server created. EXIT STATUS
0 command executed successfully 1 error in executing the command asadmin-delete-virtual-server(1AS), asadmin-list-virtual-server(1AS) J2EE 1.4 SDK March 2004 asadmin-create-virtual-server(1AS)
All times are GMT -4. The time now is 05:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy