apache httpd virtual hosts setup keep hitting the same VirtualHost
I'm trying to set up two virtual hosts. Here's my httpd config:
My problem is that, no matter which server name I try to access in my browser (blah or foobar) it'll serve from blah's DocumentRoot. However, if I were to comment out the the VirtualHost for blah, then it'll take me to foobar's DocumentRoot.
I'm running apache2 on a mac osx if that makes a difference.
Thanks!
---------- Post updated 05-25-12 at 04:19 AM ---------- Previous update was 05-24-12 at 09:09 PM ----------
Here's the solution with the help of a member from another forum.
But regarding about the errors that I had with the config that was posted:
There were multiple issues..
The biggest one is that I had a typo. (I had fooboar, not foobar)
Second, I need to include the port in NameVirtualHost as well as in
Also, what helped a lot while debugging this was start httpd in debug mode which is:
I am having problems in implementing the virtual hosts here in my server. I have this one cloud dev server: Amazon Linux AMI release 2013.03 (based on RHEL like CentOS) with Apache 2.2.25 installed and I'm trying to create 2 virtual hosts: test-kalc.tk and test2-kalc.tk.
If I go to... (2 Replies)
Hi, I was wondering if someone could help me out here. I am super-paranoid, so am trying to limit what PHP files can be executed on this server. I have a small list of files that I want to allow. The rest, deny:
<Files ~ "\.(php|php3)$">
order allow,deny
deny from all
</Files>
I... (0 Replies)
Hi, I was wondering if someone could help me out here. I am super-paranoid, so am trying to limit what PHP files can be executed on this server. I have a small list of files that I want to allow. The rest, deny. So I have base rule that denies all php files server-wide: order allow,deny ... (0 Replies)
Hello,
I have have installed two web applications on one server with one IP address and one domain name (mynet.intra). Is it possible to configure in apache 2.2 that access to one application would be from "app1.mynet.intra" and to another application from address "app2.mynet.intra"? Document... (1 Reply)
Hi,
What options should I use with ./configure to include mod_dav into the build? I use --enable-dav and I didn't see mod_dav.so anywhere in the build directory. I need to load mod_dav.so as a module during httpd startup.
Thanks. (1 Reply)
I've set up a forward proxy within a VirtualHost (see below) on Apache 2.2.11. I then browse using mydomain.com:80 as the proxy - I've also tried using the IP address of the VirtualHost xxx.xxx.xxx.xxx:80. It works fine, the only problem is that in both cases the server's main IP address is always... (2 Replies)
Folks;
I need help knowing how to add an application to existing Virtual host on Apache. here's the details:
I have a virtual host file (Based on IP address) for Apache and is configured to run application inside it. How can i add another application to the same virtual host based on the same IP... (0 Replies)
Hey all,
I'm having some apache problems. I've installed apache countless times on FreeBSD. However, I'm having some problems and I could use some help. Here is my system info:
FreeBSD 5.2.1
Apache 2.0.51 (/usr/local/apache2), doc root (/www symlink to /var/www)
PHP 5.0.1 (/usr/local/php)... (2 Replies)
I have just configured httpd.conf on a new Redhat 9 install. Below are my additions to httpd.conf. Everything works fine except that when typing http://spetnik.d2g.com into my web browser, I am sent to the "Default catch all" site. Any clues?
NameVirtualHost *:80
#Default catch all ... (5 Replies)