Nginx sbin and Conf files are not in the same directory how to install a security dog

Source: Internet
Author: User
Tags centos server
What is the nature of the problem?

Generally we use the Redhat system, such as CentOS Yum,debian system Apt-get installation Nginx, General Sbin directory and conf directory is separate, so that the security dog can not find Nginx directory, we manually enter the directory is not possible (as shown), Because only one directory can be entered at a time, one time before this problem was in the CentOS server, when the cloud lock was used instead of the security dog. And when I do this, I'm going to find a way to solve it myself.


So how did I fix that?

The following is an example of Ubuntu

Since they are separate, can we merge? (using a soft connection, of course)

First, look where they are.

Whereis Nginx


Like we're merging them in/usr/local/nginx.

Cd/usr/local/nginx/sudo ln-s/usr/sbin/./sbinsudo ln-s/etc/nginx./conf

Then start the safe dog's py installation script again


There's another new problem, like nginx hanging up.


Restart the server, or not, with the following command to detect what the cause of the restart is not

sudo nginx-t


If it doesn't exist, create it.

Cd/usr/local/nginxsudo mkdir logscd logs/sudo Touch error.logsudo service Nginx Restart

Open your own website test, success, haha ~ ~ ~


The above describes the Nginx sbin and conf files are not in the same directory how to install the security dog, including the aspects of the content, I hope that the PHP tutorial interested friends helpful.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.