Centos 7 asp.net core web site issue record __.net

Source: Internet
Author: User

In the learning phase, refer to the blog of the Great God Ants "deploy asp.net core applications to production (CENTOS7)" To complete the exercise, and thank you very much.

In the process, still encountered some problems, but also recorded for the forgotten. I. The question of adding nginx to the SELinux white list

When configuring the forwarding of Nginx to ASP.net core applications, it involves SELinux policy configuration to add Nginx to the SELinux whitelist, which lists the following commands:

    Yum install Policycoreutils-python

    sudo cat/var/log/audit/audit.log | grep nginx | grep denied | audit2allow-m myngi NX

    sudo semodule-i mynginx.pp

But when I execute the middle command under a non-root user, I'm not prompted enough:
sudo cat/var/log/audit/audit.log | grep Nginx | grep denied | Audit2allow-m Mynginx

second, the problem when configuring supervisor

After you configure supervisord.conf, perform the "supervisorctl Reload" command to complain:

[Root@d-centos7 nginx]# Supervisorctl Reload
Error: <class ' Socket.error ', [Errno 2] No such file or directory:file:/usr/lib64/python2.7/socket.py line:224

Toss for a long time can not solve, the internet has said is not specified in the configuration user caused by, I thought it is supervisord.conf file in the [Supervisord] section to specify user, as follows

[Supervisord]
Logfile=/tmp/supervisord.log; Main log file; Default $CWD/supervisord.log
logfile_maxbytes=50mb        Max main logfile bytes b4 rotation; default 50MB
LOGFILE_BACKUPS=10           # of main logfile backups 0 means none, default
loglevel=info                ; log level; default in Fo Others:debug,warn,trace
pidfile=/tmp/supervisord.pid; supervisord pidfile; default Supervisord.pid
Nodaemon=false               start in foreground if true; default false
minfds=1024                  min. avail Startup file descriptor S Default 1024
minprocs=200                 avail process descriptors;default
umask=022                   ; process file Creation Umask; Default 022
user=root                 default is current user, required if root
But later found that it seems not the problem here, as long as the first regardless of the problem, continue to apply the configuration that is [Program:webapplication1] configuration, should be no problem.

After all the configuration, we found the following problems:

[Root@d-centos7 conf.d]# supervisord-c/etc/supervisord.conf
error:another program are already listening on a port th At one of our HTTP servers are configured to use.  Shut this program down the before starting Supervisord.
For help, Use/usr/bin/supervisord-h

This problem, the execution of the following command is resolved (it may have been started before Supervisord):

[Root@d-centos7 etc]# Unlink/tmp/supervisor.sock

After that, it's normal:

[Root@d-centos7 etc]# supervisord-c/etc/supervisord.conf
[root@d-centos7 etc]# ps-ef |grep Web
root     25794 25790  2 22:31?        00:00:00 dotnet WebApp1.dll
root     25812 20065  0 22:31 pts/2 00:00:00    grep--color=auto Web




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.

Tags Index: