Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache and VHosts - Strange behaviour

Status
Not open for further replies.

pendar83

Technical User
Joined
Sep 16, 2004
Messages
3
Location
GB
Hi,

I'm having a problem with Apache 1.3 Virtual Hosts. When I set up httpd.conf to have vhosts it does strange things. Here's what happens:

I access a website hosted on the linux server. It loads up and is ok. After a few clicks, trying to access different pages of the website, it starts failing to find pages and comes up with the message "The file ... cannot be found on this server" and I know for a fact that the page exists. In fact sometimes I load up a page and it's fine, if I press F5 to reload, some of the pictures disappear and if I press F5 again the whole page disappears. And it's not the cache either, I have tried deleting the internet files and history and loading it up again.

Is there something I need to set in the settings of the vhosts? cause I don't have this problem with the main server. If I remove all vhosts and have the linux server host one main website, it's ok.

One thing I noticed in the error log is that when I restart Apache I get a 'segmentation fault'. Is that a problem?
Here's what the error log shows:
[Fri Sep 17 10:27:51 2004] [notice] caught SIGTERM, shutting down
[Fri Sep 17 10:28:00 2004] [notice] mod_backhand -- UnixSocketDir set to /var/state/backhand
[Fri Sep 17 10:28:02 2004] [notice] mod_backhand -- UnixSocketDir set to /var/state/backhand
[Fri Sep 17 10:28:03 2004] [notice] backhand_init(11570) spawning stats things (PID 11584)
[Fri Sep 17 10:28:04 2004] [notice] Apache/1.3.14 (Unix) (SuSE/Linux) mod_throttle/3.0 mod_layout/1.0 mod_fastcgi/2.2.2 balanced_by_mod_backhand/1.1.0 mod_perl/1.24 PHP/3.0.17-dev configured -- resuming normal operations
[Fri Sep 17 10:28:04 2004] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Sep 17 10:28:04 2004] [notice] child pid 11584 exit signal Segmentation fault (11)

It's my first time setting up a linux server and I really need to get this done soon. I'd really appreciate your help.

I can provide more details about the settings in the httpd.cong file if it helps.

Many Thanks,

Pendar83

 
A segmentation fault in Apache is a hard failure of one of the child binary instances. This is a "crash" and needs to be sorted out. You'll notice a child seg faulting immediately upon startup. You've got a bad module or something. I'd consider recompiling or reinstalling the Apache and related packages.


 
Thanks for your advice thedaver.

Can you tell me how I can find out what packages are related to Apache. i.e. which ones I'll need to recompile/reinstall?

Sorry if this is a novice question, but I'm quite new to Linux.

Thanks again.

Pendar83
 
No problem with the question... :-)
Which distribution are you using and did you compile the Apache+ or did you install packages?

My guess is that you are new enough that you installed packages.

If so, I'll need to the know the distribution (RedHat, Debian, Suse) to be of any help.

 
If you're using an RPM based system you can do this:

Code:
ns1(~)$ rpm -q --provides httpd | while read capability ; do rpm -q --whatrequires $capability ; done | grep -v "no package requires"
mailman-2.0.13-3
mod_perl-1.99_05-3
mod_python-3.0.0-10
mod_ssl-2.0.40-11.9
mod_perl-1.99_05-3
httpd-2.0.40-11.9
mod_perl-1.99_05-3
httpd-2.0.40-11.9
mod_perl-1.99_05-3
mod_python-3.0.0-10
redhat-config-httpd-1.0.1-13
mod_ssl-2.0.40-11.9
 
I installed the SuSe 7.1 distro, which had Apache 1.3 as one of the packages and was installed as default. So I guess Apache was installed as a package.

I have PHP and mySQL installed as well. I won't need to re-install/re-compile them, will I? Although that shouldn't be too hard anyway.

Since I will need to re-install some stuff, could I upgrade to Apache 2.0 and PHP 5?

Appreciate your help :-)

Pendar83
 
Sorry but I just have to say this:

Get what you have already installed working first before trying to upgrade, you will not resolve a problem any other way (well only if your lucky).

Copy your httpd.conf away and reinstall the apache 1.3 RPM by all means, but take it one step at a time.

Also check your httpd.conf for bad syntax with:
Code:
httpd -t
And test what you modules you have compiled and included with:
Code:
httpd -l

I hope that helps

Laurie.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top