Reputation: 6798
Hello im using Ubuntu and for example i installed nginx via apt-get and via passenger, now i have two nginx.conf location (/opt/nginx/conf/nginx.conf and /etc/nginx/nginx.conf) (but i removed first nginx installation with apt-get remove nginx
) where i can ensure what configuration file (nginx.conf) /etc/init.d/nginx start will use ? It si more general linux question than nginx related.
Upvotes: 1
Views: 948
Reputation: 2721
In Debian-based Linux, you can use dpkg
to find the package to which a file belongs:
dpkg -S /etc/nginx/nginx.conf
Note that this will only work for files installed by dpkg
(and therefore apt-get
, Synaptic, USC, etc.). In this particular case, I'd wager that passenger installs into /opt, since an alternate package manager installing into /etc would be borderline evil.
Upvotes: 1
Reputation: 13416
One approach is to rename one of these configuration files and see whether the service can still start.
Upvotes: 1