Re: Weird NameVirtualHost problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






Sorry, but I did check the correct conf file. Apache runs here with both -d and -f flags and a "ps -x" shows both. As I mentioned when I ran the -S flag it showed the NameVirtualHost block, and then showed it removed. Apache was reinstalled after FreeBSD with the current distribution from Apache.org. Like I said, it's a weird one...

Thanks anyway....I'll keep poking at it....





At 05:53 PM 11/2/2007, you wrote:
You did not test #1.  If you run "httpd -S" without the correct -f
option, you are testing httpd.conf. (FreeBSD's Apache httpd defaults
to "/usr/local/etc/apache/httpd.conf".) httpd.conf will not affect
your production server if your init scripts use the -f option.

The best scenario matching the symptoms you described is that the
production server is not using the configuration file you have been
editing.

As suggested in my previous post, rename the file and restart httpd to
prove the file is the one being used.  If Apache httpd runs properly
without that file, search for the configuration file being used.

solprovider

On 11/2/07, tech1 <tech1@xxxxxxxx> wrote:
> Thanks.
>
> 1) I'm sure it's the correct conf file, I removed the entire
> NameVirtualHost section and checked with httpd -S to see that they were
> gone after a -HUP. Then I put them back and checked it again.
>
> 2) I mentioned I'm using FreeBSD. It is always the same hosts that work, I
> added them a couple months ago. I had some trouble then also, but it just
> started working after a reboot, one of many. I checked file handles and
> they are around 8k.
>
> 3) I see no errors, and the problem persists even with the hosts
> rearranged. And they were all generated by a script and "look" ok. Here's a
> sample from the conf file:
>
>
> NameVirtualHost 123.456.789.10
> <VirtualHost 123.456.789.10>
> ServerName a.com
> ServerAlias www.a.com a.com
> DocumentRoot /var/www/htdocs/sites/a.com
> ErrorLog /var/www/logs/a.com-error_log
> TransferLog /var/www/logs/a.com-access_log
> </VirtualHost>
> <VirtualHost 123.456.789.10>
> ServerName m.com
> ServerAlias www.m.com m.com
> DocumentRoot /var/www/htdocs/sites/m.com
> ErrorLog /var/www/logs/m.com-error_log
> TransferLog /var/www/logs/m.com-access_log
> </VirtualHost>
> .
> At 12:41 PM 11/2/2007, you wrote:
> >1. Which VirtualHosts work should change when you change the order of
> >the entries.  Are you certain you are editing the correct
> >configuration file?  Rename the configuration file and restart the
> >server to verify.  Apache httpd will error without the configuration
> >file.  If the server starts properly, check your init scripts for the
> >-f option.
> >
> >2. Do approximately the same number of entries work?  What OS are you
> >using?  VirtualHosts can require file handles, especially with log
> >files specific to each virtual host; did the server exceed its limit?
> >
> >3. Maybe a typo in httpd.conf.  Please post the NameVirtualHost and a
> >few <VirtualHost> sections, especially the last working one and the
> >first broken one.  You can change the severs to example.com and the IP
> >Addresses.
> >
> >For easier configuration and less chance of accidentally destroying
> >the main configuration file, you can replace the <VirtualHost>
> >sections with
> >   Include conf/virtualhosts.conf
> >and put all the <VirtualHost> entries in the new file.
> >
> >solprovider
> >
> >
> >On 11/2/07, tech1 <tech1@xxxxxxxx> wrote:
> > > I'm running apache 1.3 on a FreeBSD box. I've just started using
> > > NameVirtualHosts for about 100 web sites. There are other web sites on the
> > > server using individual IP addresses. The <VirtualHost IP.IP.IP.IP>
> > > containers are all identical except for the info pertinent to each domain
> > > name and directory, they were ALL generated by a script, including the
> > > "old" ones. I've tested them and they are accurate. I rearranged the list > > > in the conf file to make sure there wasn't an issue with one VirtualHost > > > container. The problem: the first 10 or so that I set up 2 months ago work > > > just fine, anything added after that doesn't work at all. I've checked DNS > > > on the names that aren't working, and I've also run an 'httpd -S' and can > > > see all of the NameVirtualHost domains with no errors. I've restarted the > > > server and apache multiple times. I can't get anything other than the first
> > > batch to work.
> > >
> > > I don't know what else to do.... I thought maybe it was a DNS cache related > > > thing so I waited a couple days to see if they'd kick in. I tried removing > > > the whole NameVirtualHost block and restarting the server, then putting it > > > all back and restarting again. I tried rearranging them all so that others
> > > would be listed before the ones that work. Nothing I've done makes any
> > > difference.
> > >
> > > I don't want to "waste" 100 IP addresses, anyone have any ideas or
> > > suggestions? Any other places I might look?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux