LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-28-2005, 11:29 PM   #1
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Rep: Reputation: 15
httpd.conf help


Im so close to having this server set up, or at least havint the first step done. but i ran into a snag near the end.

below is the section of my httpd.conf file that is throwing an error when i try to start the server:

GET / HTTP/1.1
Host: www.mysite1.com
Accept: text/html. text/plain
Accept: postscript-file. default. text/sgml. */*:q=0.01
Accept-Encoding: gzip. compress
Accept-Lanuage: en
User-Agen: Lynx/3.0.odev.9 libwww-FM/2.14

the Error i get is as follows:

"http failed. Invalid command 'GET', perhaps mis-spelled or defined by a module not included in the server configuration"

all this is being run on Red Hat 9 with Apache 2.0. any sugesstions as to what i might be missing here would be great help.


__________________
 
Old 03-01-2005, 01:10 AM   #2
esben
Member
 
Registered: Jun 2003
Location: Copenhagen, Denmark
Distribution: Gentoo
Posts: 48

Rep: Reputation: 15
I don't think that bit is meant to be in your config file at all. It's a raw HTTP get message, such as you would type in over telnet. You could try to comment it out, or show us a bit more from your config file.
 
Old 03-01-2005, 02:43 AM   #3
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Original Poster
Rep: Reputation: 15
Ok heres the long version of my question what im really trying to do here, and i should have made that clear in the beginning is get my virtual Host(s) to work. right now which ever <VirtualHost> i put in the .conf first shows on both URLs when you type them into a browser.

here is a better look at my .conf file


### Section 3: Virtual Hosts
#
LockFile "/var/lock/httpd.lock"
CoreDumpDirectory "/etc/httpd"


<Directory "/">
Options FollowSymLinks

AllowOverride None



</Directory>

<Directory "/var/www/html ">
Options Indexes Includes FollowSymLinks

AllowOverride None
Allow from from all


Order allow,deny
</Directory>

<Directory "/var/www/icons">
Options Indexes MultiViews

AllowOverride None
Allow from from all


Order allow,deny
</Directory>

<Directory "/var/www/cgi-bin">
Options ExecCGI

AllowOverride None
Allow from from all


Order allow,deny
</Directory>

NameVirtualHost *

<VirtualHost *>

DocumentRoot "/var/www/html/mysite1"
ServerName Vhost.mysite2.com
ServerAdmin someone@blabla.com

</VirtualHost>

<VirtualHost *>

DocumentRoot "/var/www/html/mysite2"
ServerName Vhost.mysite2.com
ServerAdmin someone@blabla.com

</VirtualHost>

Please Please Please tell me you can help. im growing desperate here

Last edited by eckertc1; 03-01-2005 at 02:44 AM.
 
Old 03-01-2005, 04:37 AM   #4
dws160468
LQ Newbie
 
Registered: Mar 2004
Location: Australia
Distribution: Arch, Slackware, Debian, Mandrake, RedHat, Centos
Posts: 5

Rep: Reputation: 0
Hi

From your first post, I take it you got a Syntax error on line nnn before the "http failed" message?


The 2nd posting of httpd.conf doesn't reference this error above, so assuming the 1st prob was fixed up, then here's the current problem:

<quote>right now which ever <VirtualHost> i put in the .conf first shows on both URLs when you type them into a browser.</quote>


In both the last two VirtualHost blocks the ServerName is the same, where it should not be. I think you want something like (just replacing the last part of your file):

NameVirtualHost *

<VirtualHost *>

DocumentRoot "/var/www/html/mysite1"
ServerName www.mysite1.com
ServerAlias mysite1.com *.mysite1.com
ServerAdmin someone@blabla.com

</VirtualHost>

<VirtualHost *>

DocumentRoot "/var/www/html/mysite2"
ServerName www.mysite2.com
ServerAlias mysite2.com *.mysite2.com
ServerAdmin someone@blabla.com

</VirtualHost>
 
Old 03-01-2005, 06:51 AM   #5
gnube
LQ Newbie
 
Registered: Dec 2003
Location: Gothenburg, Sweden
Distribution: Fedora | RedHat
Posts: 13

Rep: Reputation: 0
Are you giving lynx the right URI? The output message is confusing, have you edited it? It looks like it is not in the right format.

Try

sudo apachectl status

and see what that produces.
 
Old 03-01-2005, 06:55 AM   #6
gnube
LQ Newbie
 
Registered: Dec 2003
Location: Gothenburg, Sweden
Distribution: Fedora | RedHat
Posts: 13

Rep: Reputation: 0
You can also do;

apachectl configtest

this will find any virtual host problems in your httpd.conf file. You should always run this before you start apache then you will know that your problems lie not with apache but with the browser or html file or somewhere else. (In theory anyway.)
 
Old 03-01-2005, 09:16 AM   #7
chenglim
LQ Newbie
 
Registered: Jan 2005
Posts: 18

Rep: Reputation: 0
1) tail your "log" file and check the errors is also a good idea.
2) also check you logs directory... silly apache will fail if the log directory is not exist
 
Old 03-02-2005, 05:03 AM   #8
idokus
LQ Newbie
 
Registered: Sep 2004
Distribution: ubuntu
Posts: 10

Rep: Reputation: 0
I'm not quite sure, but what I did was replacing the * in all the virtual host tags with the actual ip address, it solved about the same problem for me.

if you're in a private lan use the private lan ip
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
httpd.conf help eckertc1 Linux - General 2 03-01-2005 01:47 AM
Httpd.conf And Httpd2.conf ???? alejandroye Linux - General 2 11-07-2004 12:23 AM
httpd.conf & ssl.conf kevinm2 Linux - Security 12 08-31-2004 01:25 PM
saving changes to apache2/conf/httpd.conf file Zaius Linux - Newbie 6 01-09-2004 11:45 PM
httpd chokes on ScriptAlias line in Apache httpd.conf lhoff Linux - Software 1 07-14-2003 10:32 PM

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

All times are GMT -5. The time now is 04:34 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