LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Please amend apache conf/httpd.conf file please (http://www.linuxquestions.org/questions/linux-newbie-8/please-amend-apache-conf-httpd-conf-file-please-586347/)

payjoe 09-21-2007 11:21 AM

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

GrapefruiTgirl 09-21-2007 11:37 AM

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.

stickman 09-21-2007 12:05 PM

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.

payjoe 09-21-2007 12:54 PM

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

#

GrapefruiTgirl 09-21-2007 01:07 PM

its the pound sign: #

payjoe 09-21-2007 01:39 PM

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

payjoe 09-21-2007 02:08 PM

Buuuurrrr it's cold inthe wilderness..

can any one..explain......

GrapefruiTgirl 09-21-2007 06:12 PM

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.


All times are GMT -5. The time now is 06:52 PM.