Apache not using second vhost..

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Apache not using second vhost..
# 1  
Old 10-02-2012
Apache not using second vhost..

I have a test setup running apache 2.2. I'm just serving up some images to my dekstop.

I can't get apache to use my second vhost entry.. I know both entries work as I switched them around in my vhosts.conf. I just can't use them both at the same time.

Can someone help me please?

my vhosts.conf looks like this:

Code:
<VirtualHost *:80>
ServerName mysite.com
DocumentRoot /data/usr/mysite.com/public_html
ScriptAlias /cgi-bin/ /data/usr/mysite.com.com/cgi-bin
SuexecUserGroup global users
RLimitCPU 50
RlimitMem 15000000
RlimitNPROC 50
CustomLog logs/mysite.com.log combined
ErrorLog logs/mysite.com.error_log
</VirtualHost>

<VirtualHost *:80>
ServerName myothersite.com
DocumentRoot /data/usr/myothersite.com
SuexecUserGroup global users
RLimitCPU 50
RlimitMem 15000000
RlimitNPROC 50
CustomLog logs/myothersite.com.log combined
ErrorLog logs/myothersite.com.error_log
</VirtualHost>

my httpd.conf looks like this:

Code:
NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
Include /etc/httpd/conf.d/vhosts.conf

---------- Post updated 10-02-12 at 03:35 AM ---------- Previous update was 10-01-12 at 11:59 AM ----------

I was entering an IP address rather than a domain name into my browser. Once I updated my hosts file to resolve mysite.com and myothersite.com to an IP it all worked OK. I am now able to hit both sites serving different images.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Red Hat

Process not running: /opt/java15/jdk/bin/java -classpath /opt/apache/apache-ant-1.7.0-mod/lib/ant-la

Have no idea on what the below error message is: Process not running: /opt/java15/jdk/bin/java -classpath /opt/apache/apache-ant-1.7.0-mod/lib/ant-launcher.jar org.apache.tools.ant.launch.Launcher -buildfile build.xml dist. Any help? (3 Replies)
Discussion started by: gull05
3 Replies

2. Linux

Apache vhost - debug web request

Hello all, I have several vhost and not sure which vhost is serving the requests to my url http://www.mydomain.tld i have ssh access to the web server is there a way e.g curl to know exactly which vhost served the request. one of my friend suggested logs but i want to find another... (4 Replies)
Discussion started by: coolatt
4 Replies

3. Web Development

Apache module development on apache 2.2

Hi, I'm new to developing modules for Apache. I understand the basics now and can develop something simple which allows a 'GET' request to happen, but what I want to do is actually 'POST' information to my site. I know the basic POST Request works and I can see that it is post by looking at... (2 Replies)
Discussion started by: fishman2001
2 Replies

4. Web Development

Vhost issue in apache ..Unable to figure out

Hi I have vhosts configured for my sites like: <VirtualHost ip_abc:8081> ........ ..... .... </VirtualHost> Now I have added a new vhost but on entering the same information on some other port say: <VirtualHost ip_abc:8082> ........ ..... .... </VirtualHost> (2 Replies)
Discussion started by: ankur328
2 Replies

5. AIX

Create vhost in vios

Hello, I would like to create new lpar , but first i need to create a vhost to associate with it, does anyone know how to create vhost and associate it with lpar? Thanks in advance (1 Reply)
Discussion started by: prpkrk
1 Replies

6. Solaris

/usr/lib/vhost.so missing Solaris 5.10

Hi, i have a solaris 5.10 machine on which i am getting below error while executing cat command ld.so.1: cat: fatal: vhost.so: open failed: No such file or directory Killed it is related to file vhost.so missing Also when i did ldd cat result is as below libc.so.1... (1 Reply)
Discussion started by: Jcpratap
1 Replies

7. Web Development

Apache vhost redirect to a cgi file

Hi guys, I've been trying to figure this out all day however havent managed to as of yet. I have a server called netmon (network monitoring) which runs a multitude of programs to monitor the network. I also have a cname pointing to netmon called smokeping. At the moment to access smokeping... (0 Replies)
Discussion started by: JayC89
0 Replies

8. AIX

To see vhost on VIOS after creating an HMC profile

I created a profile in HMC for a new LPAR and activated it but not yet installed AIX. Is there a step to make this new LPAR available as vhostX from the VIO server after creating and activating an HMC profile? I already shared the CD-ROM device from the HMC profile. Thanks. -... (1 Reply)
Discussion started by: learner1
1 Replies

9. Shell Programming and Scripting

Whats the Vhost Command for the Unix Shell

anyone know? would be greatly thankful. (4 Replies)
Discussion started by: shellnewbie
4 Replies
Login or Register to Ask a Question