Error at Nagios

Hi !

I’m trying to configure nagios, but when I use the command to see if it has erros at the Nagios’configuration, it show this:

unexpected token or statement in file ‘/usr/local/nagios/etc/cgi.cfg’ on line 15

and this line is: main_config_file=/usr/local/nagios/etc/nagios.cfg

In my opinion Nagios is not recognize the cgi.cfg file.

Someone have any idea of how can I fix this error

thanks
Thiago

Does the file /usr/local/nagios/etc/nagios.cfg exist and has the correct rights?

I suspect that you used wordpad or some other editor to modify cgi.cfg. Doing so, adds weird characters to files, that you can’t see.
Edit your cfg files with vi ONLY, or some other approved editor.
So fix that line using vi. Delete the entire line and add the same text you pasted above.
main_config_file=/usr/local/nagios/etc/nagios.cfg