LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-21-2007, 10:21 AM   #1
payjoe
LQ Newbie
 
Registered: Apr 2007
Posts: 13

Rep: Reputation: 0
Smile Please amend apache conf/httpd.conf file please


Calling cyper space...come in cyper space.......

as you would guess my day is not going well.....

if you hacve the knowledge would you amend this file in order that I can copy and paste your version..this way I may be able (after 6 hrs) to restart my apache webserver.

The error's I receive are this

yntax error on line 1037 of /etc/httpd/conf/httpd.conf:
</VirtualHost> without matching <VirtualHost> section
> apachectl -configtest
Syntax error on line 1037 of /etc/httpd/conf/httpd.conf:
</VirtualHost> without matching <VirtualHost> section
> apachectl -configtest
Syntax error on line 1037 of /etc/httpd/conf/httpd.conf:
</VirtualHost> without matching <VirtualHost> section
> apachectl -configtest
Syntax error on line 1055 of /etc/httpd/conf/httpd.conf:
</VirtualHost> without matching <VirtualHost> section
> apachectl -configtest
Syntax error on line 1027 of /etc/httpd/conf/httpd.conf:
ServerAlias only used in <VirtualHost>


the to amend is this


<VirtualHost *:80>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
#<VirtualHost *:80>
#SuexecUserGroup slp issoff
ServerName issoff.com
ServerAlias www.issoff.com
DocumentRoot /home/gary1/public_html
ErrorLog /home/gary1/logs/error_log
CustomLog /home/gary1/logs/access_log common
ScriptAlias /cgi-bin/ /home/gary1/cgi-bin/
<Directory /home/gary1/public_html>
AllowOverride All
Options Indexes IncludesNOEXEC FollowSymLinks
allow from all
</Directory>
#</VirtualHost>
RewriteLogLevel 3
RewriteLog "/var/log/httpd/rewrite.log"
#<VirtualHost *:80>
ServerName recruitmentnews.issoff.com
ServerAlias www.recruitmentnews.issoff.com
DocumentRoot /home/gary1/domains/recruitmentnews.issoff.com/public_html
ErrorLog /home/gary1/domains/recruitmentnews.issoff.com/logs/error_log
CustomLog /home/gary1/domains/recruitmentnews.issoff.com/logs/access_log "common"
ScriptAlias /cgi-bin/ /home/gary1/domains/recruitmentnews.issoff.com/cgi-bin/
<Directory /home/gary1/domains/recruitmentnews.issoff.com/public_html>
Options Indexes IncludesNOEXEC FollowSymLinks
allow from all
HostNameLookups on
</Directory>
LogLevel alert
CheckSpelling On
AliasMatch ^/.*$ /etc/cpplus/virtual_server/disabled.html
#</VirtualHost>


Thank you
 
Old 09-21-2007, 10:37 AM   #2
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Something's amiss there. The error(s) tell you that you've got a CLOSE </virtualhost> without a matching OPEN. The piece of the file you gave us shows an OPEN without a CLOSE.

How about loading the file into your text editor, clicking EDIT --> GOTO LINE NUMBER... and going to line 1037. Then cut & paste for us about 20 lines before and after that line, OR the entire offending section.

EDIT - better make it 30 lines before & after.
 
Old 09-21-2007, 11:05 AM   #3
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
The errors here are relatively self explantory. I chopped this down to just the first one. If you look at the above snippet, you'll notice that you have the opening "<VirtualHost *:80>", but the next "</VirtualHost>" is commented out with a "#". You need to got through this entire section of your config file and uncomment the opening an closing VirtualHost lines where you have uncommented config directives. For example, if you look at the section from "ServerName issoff.com" to "</Directory>", you notice that the surrounding VirtualHost lines are commented out. If you fix the errors one at a time, it should be relatively painless. I pointed this out in the other thread that you started regarding this same issue.
 
Old 09-21-2007, 11:54 AM   #4
payjoe
LQ Newbie
 
Registered: Apr 2007
Posts: 13

Original Poster
Rep: Reputation: 0
Lightbulb

thanks for the help...when you say commented out..would you explain what that is...as I,ve wikkied and google for an understanding...


is it < >

or

#
 
Old 09-21-2007, 12:07 PM   #5
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
its the pound sign: #
 
Old 09-21-2007, 12:39 PM   #6
payjoe
LQ Newbie
 
Registered: Apr 2007
Posts: 13

Original Poster
Rep: Reputation: 0
OK i,M THIS FAR

Syntax error on line 1036 of /etc/httpd/conf/httpd.conf:
Expected </VirtualHost> but saw </Directory>

</VirtualHost>
<VirtualHost *:80>
#SuexecUserGroup slp issoff
ServerName issoff.com
ServerAlias www.issoff.com
DocumentRoot /home/gary1/public_html
ErrorLog /home/gary1/logs/error_log
CustomLog /home/gary1/logs/access_log common
ScriptAlias /cgi-bin/ /home/gary1/cgi-bin/
Directory /home/gary1/public_html
AllowOverride All
Options Indexes IncludesNOEXEC FollowSymLinks
allow from all
</Directory>
</VirtualHost>
RewriteLogLevel 3
RewriteLog "/var/log/httpd/rewrite.log"
<VirtualHost *:80>
ServerName recruitmentnews.issoff.com
ServerAlias www.recruitmentnews.issoff.com
DocumentRoot /home/gary1/domains/recruitmentnews.issoff.com/public_html
ErrorLog /home/gary1/domains/recruitmentnews.issoff.com/logs/error_log
CustomLog /home/gary1/domains/recruitmentnews.issoff.com/logs/access_log "common"
ScriptAlias /cgi-bin/ /home/gary1/domains/recruitmentnews.issoff.com/cgi-bin/
<Directory /home/gary1/domains/recruitmentnews.issoff.com/public_html>
Options Indexes IncludesNOEXEC FollowSymLinks
allow from all
HostNameLookups on
</Directory>
LogLevel alert
CheckSpelling On
AliasMatch ^/.*$ /etc/cpplus/virtual_server/disabled.html
</VirtualHost>

I have tried difertent combinations no joy
 
Old 09-21-2007, 01:08 PM   #7
payjoe
LQ Newbie
 
Registered: Apr 2007
Posts: 13

Original Poster
Rep: Reputation: 0
Buuuurrrr it's cold inthe wilderness..

can any one..explain......
 
Old 09-21-2007, 05:12 PM   #8
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
For every OPEN statement, there needs to be a corresponding CLOSE statement. So, for example, if it says:

<virtualhost>
then somewhere soon after, there should be a </virtualhost>

and similarly, if there is a <directory> then there will somewhere following that need to be a </directory>

You might do well to start with a clean file, and gradually make your changes to it, rather than try to correct this butchered file without having a good idea what are the problems with it. At the very least, have a cleean working file to LOOK AT as an example.
 
  


Reply

Tags
explain


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
Restoring Apache httpd.conf file shof515 Fedora 1 11-24-2005 10:54 PM
Apache httpd.conf file?? matux Mandriva 2 01-28-2005 09:20 AM
Fedora 1, Apache, httpd.conf file Turner Linux - Newbie 2 07-07-2004 12:11 PM
PHP - What to add to Apache httpd.conf file? maktos Linux - Software 9 04-17-2004 08:18 PM
saving changes to apache2/conf/httpd.conf file Zaius Linux - Newbie 6 01-09-2004 11:45 PM


All times are GMT -5. The time now is 03:53 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration