Take the 2-minute tour ×

So uh, I installed nginx on my home network via yum. Now I'd like to change the configuration. However, upon locate nginx, it yields no results. None. As if nginx isn't here at all. Meanwhile,

[root@localhost ~]# service nginx status
nginx (pid  3235) is running...

I'm confused. Where is my nginx configuration? Or my directory for nginx? Or nginx at all?

CentOS5.7, by the way

EDIT: Well, I've found nginx. /etc/nginx, so why isn't it showing up on my locate? I've ran updatedb...

share|improve this question
add comment

3 Answers

up vote 4 down vote accepted

Most, if not all standard linux software packages keep their configurations in /etc. So, I'd check /etc/nginx.

share|improve this answer
Yeah, I found it there. Finished editing the question right as you posted your answer. :X –  Rob Feb 25 '12 at 4:39
add comment

In the future if you install something w/o verbosity and later want to know what files it installed on an RPM-based distribution, run this:

rpm -ql <package name> | sort | uniq

Should give you a full list of the files the package installed. Were this a .deb-based (apt) distribution, their equivalent is:

dpkg -L <package name>
share|improve this answer
add comment

As a direct answer: /etc is the default location for configuration files, so you can just look there, but that's not always obvious.

The better approach to find onfiguration files for a given package would be to follow these steps (goes for any package):

To find the configuration files of any rpm, you can use rpm -qc package


# rpm -qc yum

Alternatively, you can use man with the name of the executable in question, and look at the related man pages. Any man page with a (5) relates to configuration files. For example, if you man yum, and look at the related man pages, you'll find this:

       pkcon (1)
       yum.conf (5)
       yum-updatesd (8)
       package-cleanup (1)
       repoquery (1)
       yum-complete-transaction (1)
       yumdownloader (1)
       yum-utils (1)
       yum-security (8)
       yum search yum

Then you can call man yum.conf to call the full documentation on the configuration file options and syntax.

Alternatively, you can also check the /usr/share/doc/$package_name for more documentation.

You can also run makewhatis and then man -k <keyword> to see all man pages relating to a specific keyword.

share|improve this answer
Thanks for all the information! –  Rob Feb 27 '12 at 6:41
My pleasure! I'd rather teach how to fish than blindly give fish away ;) –  Yanick Girouard Feb 28 '12 at 3:54
add comment

Your Answer


