Webhosting Blog

Checking server configuration files through command line.


Following commands can help to check the syntax of the configuration files  of different services directly through command line.

1) To check the syntax of APACHE:

[root@server ~]# httpd -t

In order to check the syntax of virtualhost:

[root@server ~]# httpd -t -D DUMP_VHOSTS

2)To check syntax for DNS:

a) checking syntax errors in the main configuration file..

[root@server ~]# named-checkconf main-config-file

main-config-file : Mention the path of the main configuration file.

b)To check the zone file for a domain.

[root@server ~]# named-checkzone domain zonefile-location

zonefile-location: The exact location of the zone file to be checked

3)To check syntax of SAMBA:

[root@server ~]# testparm

4)To check syntax of SQUID server:

[root@server ~]# squid -k check
[root@server ~]# squid -k parse

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s