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. __________________ |
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.
|
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 :( |
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> |
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. |
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.) |
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 |
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 |
All times are GMT -5. The time now is 04:30 PM. |