Forum Moderators: phranque

Message Too Old, No Replies

Server Alias

It was working before, now getting error message

         

Total Rookie

3:40 pm on Mar 16, 2005 (gmt 0)

10+ Year Member



I keep getting a syntax error on a line for /usr/loca/apache/conf I just started setting up the domain on a virtual server, all went well had the server running, with generic Apache page, got e-mail up and running and started on web page. I used Front Page, I uploaded via ftp. Then I read I should stop and restart the server. I stopped it ok, can't get it restarted. Says "ServerAlias only used in <virtual host>" It has been there all along, I've read all the docs and can't get rid of it. Last time I did anything like this was 5 years ago when I partitioned a hard drive with Linux, on my home laptop, haven't done anything since and working with a server 2000 miles away, not sure what I did. E-mail still works so I didn't hose things too bad but would like to get back to original state.

Total Rookie

4:16 pm on Mar 16, 2005 (gmt 0)

10+ Year Member



I've read what I wrote and it didn't make much sense to me. Here's what I get:

-bash-2.05b# /usr/local/apache/bin/apachectl configtest
Syntax error on line 954 of /usr/local/apache/conf/httpd.conf:
DocumentRoot must be a directory
-bash-2.05b# /usr/local/apache/bin/apachectl start
Syntax error on line 956 of /usr/local/apache/conf/httpd.conf:
ServerAlias only used in <VirtualHost>
/usr/local/apache/bin/apachectl start: httpd could not be started
-bash-2.05b#
I've been in and modified to what I thought was correct, but nothing has been physically changed unless the upload hosed it. Seems conflicting to me?

jdMorgan

4:52 pm on Mar 16, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Total,

Welcome to WebmasterWorld!

If you are editing httpd.conf on a Windows machine, make sure to use the Unix line-ender (Linefeed) only. If you have no better choice, use "Save As" in MS Word, and select "US-ASCII" encoding with "LF-Only" line-enders.

We had another thread [webmasterworld.com] on file-format-related problems recently, and the symptoms were even more obscure.

Jim

Total Rookie

5:29 pm on Mar 16, 2005 (gmt 0)

10+ Year Member



Nope, I log in as root, cd to file and then easy editor in freebsd to edit, but I didn't edit anything prior to shutdown. Only thing I did do was upload frontpage, and chose ftp. Was that wrong? Could that have automatically configured the conf file?

Total Rookie

8:35 pm on Mar 16, 2005 (gmt 0)

10+ Year Member



I've got to be clearer, this is getting to me but I'll figure it out somehow. I log on to the server via SSH, Putty client. Then proceed to do all I've done. Thanks in advance for any assistance.