LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-12-2005, 06:44 PM   #1
Ougle
LQ Newbie
 
Registered: May 2005
Distribution: Mainly SuSE
Posts: 21

Rep: Reputation: 15
Question Checking Apache virtual hosts


Hi, apparently you can use the command below to check your Apache virtual hosts.
/usr/local/apache2/bin/httpd -S

Well it doesn't like it because that file doesnt exist (from the apache2 folder).
I guess this is because I'm using SuSE 9.0 and its set up differently to other distros?
So what folder/file do I use or is there another command?
 
Old 05-13-2005, 06:25 AM   #2
Ougle
LQ Newbie
 
Registered: May 2005
Distribution: Mainly SuSE
Posts: 21

Original Poster
Rep: Reputation: 15
I have no idea what to type, I have tried a few things but with no success.

Please can someone help?
 
Old 05-13-2005, 02:17 PM   #3
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
Maybe it is /usr/sbin/httpd -S

One way to find the location of httpd is "whereis httpd"
 
Old 05-13-2005, 05:55 PM   #4
Ougle
LQ Newbie
 
Registered: May 2005
Distribution: Mainly SuSE
Posts: 21

Original Poster
Rep: Reputation: 15
ok, I think it is httpd.conf that I want.
It is confusing because there are lot of config files and two httpd.conf files (in different directories).

/etc/httpd/httpd.conf -S
is what I used.

I got the following output...
Code:
linux:/etc # httpd/httpd.conf -S
httpd/httpd.conf: line 52: ServerType: command not found
httpd/httpd.conf: line 63: ServerRoot: command not found
httpd/httpd.conf: line 74: LockFile: command not found
httpd/httpd.conf: line 80: PidFile: command not found
httpd/httpd.conf: line 88: ScoreBoardFile: command not found
httpd/httpd.conf: line 105: Timeout: command not found
httpd/httpd.conf: line 111: KeepAlive: command not found
httpd/httpd.conf: line 118: MaxKeepAliveRequests: command not found
httpd/httpd.conf: line 124: KeepAliveTimeout: command not found
httpd/httpd.conf: line 142: MinSpareServers: command not found
httpd/httpd.conf: line 143: MaxSpareServers: command not found
httpd/httpd.conf: line 152: StartServers: command not found
httpd/httpd.conf: line 164: MaxClients: command not found
httpd/httpd.conf: line 180: MaxRequestsPerChild: command not found
httpd/httpd.conf: line 228: LoadModule: command not found
httpd/httpd.conf: line 229: LoadModule: command not found
httpd/httpd.conf: line 230: LoadModule: command not found
httpd/httpd.conf: line 231: LoadModule: command not found
httpd/httpd.conf: line 232: LoadModule: command not found
httpd/httpd.conf: line 233: LoadModule: command not found
httpd/httpd.conf: line 234: LoadModule: command not found
httpd/httpd.conf: line 235: LoadModule: command not found
httpd/httpd.conf: line 236: LoadModule: command not found
httpd/httpd.conf: line 237: LoadModule: command not found
httpd/httpd.conf: line 238: LoadModule: command not found
httpd/httpd.conf: line 239: LoadModule: command not found
httpd/httpd.conf: line 240: LoadModule: command not found
httpd/httpd.conf: line 241: LoadModule: command not found
httpd/httpd.conf: line 242: LoadModule: command not found
httpd/httpd.conf: line 243: LoadModule: command not found
httpd/httpd.conf: line 244: LoadModule: command not found
httpd/httpd.conf: line 245: LoadModule: command not found
httpd/httpd.conf: line 246: LoadModule: command not found
httpd/httpd.conf: line 247: LoadModule: command not found
httpd/httpd.conf: line 249: LoadModule: command not found
httpd/httpd.conf: line 250: LoadModule: command not found
httpd/httpd.conf: line 251: LoadModule: command not found
httpd/httpd.conf: line 252: LoadModule: command not found
httpd/httpd.conf: line 253: LoadModule: command not found
httpd/httpd.conf: line 254: LoadModule: command not found
httpd/httpd.conf: line 255: LoadModule: command not found
httpd/httpd.conf: line 256: LoadModule: command not found
httpd/httpd.conf: line 257: LoadModule: command not found
httpd/httpd.conf: line 258: LoadModule: command not found
httpd/httpd.conf: line 259: LoadModule: command not found
httpd/httpd.conf: line 260: LoadModule: command not found
httpd/httpd.conf: line 261: LoadModule: command not found
httpd/httpd.conf: line 263: LoadModule: command not found
httpd/httpd.conf: line 264: syntax error near unexpected token `newline'
httpd/httpd.conf: line 264: `<IfDefine DUMMYSSL>'
now all those line numbers are lines that were in the config file and I havn't touched them.
should I just delete(or comment out) each of the lines that return an error?

as it was put in there by suse or apache i would expect it to work and i shouldnt have to touch it.

I also dont understand whats wrong with the last 2 lines of output.
 
Old 05-13-2005, 06:33 PM   #5
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
You just tried to execute a config file, not a script or a program. /etc/httpd/httpd.conf is the file that the program reads before it executes so it knows how to run.

What happens when you do "whereis httpd" ?
What about "/usr/sbin/httpd" ?
 
Old 05-13-2005, 07:23 PM   #6
Ougle
LQ Newbie
 
Registered: May 2005
Distribution: Mainly SuSE
Posts: 21

Original Poster
Rep: Reputation: 15
okay, I got confused, I thought it was just outputting directories called "httpd". you were right about where it is.

so does the below seem like the right output?
Code:
linux:/ # whereis httpd
httpd: /usr/sbin/httpd /etc/httpd /usr/share/man/man8/httpd.8.gz
linux:/ # /usr/sbin/httpd
[Sat May 14 01:20:36 2005] [error] Can't locate object method "boot" via package "mod_perl" at /usr/lib/perl5/vendor_perl/5.8.1/i586-linux-thread-multi/Apache/Constants.pm line 8.
Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.1/i586-linux-thread-multi/Apache.pm line 6.
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.1/i586-linux-thread-multi/Apache.pm line 6.
Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.1/i586-linux-thread-multi/Apache/Registry.pm line 2.
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.1/i586-linux-thread-multi/Apache/Registry.pm line 2.
Compilation failed in require at /usr/include/apache/modules/perl/startup.perl line 14.
BEGIN failed--compilation aborted at /usr/include/apache/modules/perl/startup.perl line 14.
Compilation failed in require at (eval 2) line 1.
Syntax error on line 856 of /etc/httpd/httpd.conf:
Can't locate object method "boot" via package "mod_perl" at /usr/lib/perl5/vendor_perl/5.8.1/i586-linux-thread-multi/Apache/Constants.pm line 8.
Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.1/i586-linux-thread-multi/Apache.pm line 6.
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.1/i586-linux-thread-multi/Apache.pm line 6.
Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.1/i586-linux-thread-multi/Apache/Registry.pm line 2.
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.1/i586-linux-thread-multi/Apache/Registry.pm line 2.
Compilation failed in require at /usr/include/apache/modules/perl/startup.perl line 14.
BEGIN failed--compilation aborted at /usr/include/apache/modules/perl/startup.perl line 14.
Compilation failed in require at (eval 2) line 1.

It seems to make less sense to me.
Okay it is all about perl...
 
Old 05-13-2005, 07:33 PM   #7
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
Quote:
Syntax error on line 856 of /etc/httpd/httpd.conf:
I think you should start your investigation as to what is wrong right there. Hopefully that will help.
 
Old 05-13-2005, 07:54 PM   #8
Ougle
LQ Newbie
 
Registered: May 2005
Distribution: Mainly SuSE
Posts: 21

Original Poster
Rep: Reputation: 15
yikes, line 856 might be one ive added!!

ill go have a look...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 06:29 AM
Virtual Hosts with Apache noripcord7 Linux - Games 1 02-22-2004 10:33 PM
Apache Virtual Hosts gbg Linux - Software 4 10-02-2003 08:35 AM
Apache Virtual Hosts (again) scatcat Linux - General 1 10-17-2002 09:51 AM
Apache: Virtual hosts pk21 Linux - Software 15 10-08-2002 05:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration