Nginx: Job for nginx.service failed because the control process exited

前端 未结 19 1257
予麋鹿
予麋鹿 2021-01-29 19:31

I got a problem which I have been trying to fix for a few days now and I don\'t know what to do, have been looking for answers but all of those I found didn\'t help me.

19条回答
  •  灰色年华
    2021-01-29 19:58

    This worked for me:

    First, go to

    cd /etc/nginx

    and make the changes in nginx.conf and make the default port to listen from 80 to any of your choice 85 or something.

    Then use this command to bind that port type for nginx to use it:

    semanage port -a -t PORT_TYPE -p tcp 85

    where PORT_TYPE is one of the following: http_cache_port_t, http_port_t, jboss_management_port_t, jboss_messaging_port_t, ntop_port_t, puppet_port_t.

    Then run:

    sudo systemctl start nginx; #sudo systemctl status nginx

    [you should see active status]; #sudo systemctl enable nginx

提交回复
热议问题