~$ sudo systemctl status Portal.service
● Portal.service - Portal
Loaded: loaded (/etc/systemd/system/Portal.service; enabled; vendorpreset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Tue 2024-03-26 18:26:18 IST; 9s ago
Main PID: 22487 (code=exited, status=200/CHDIR)
Tasks: 0 (limit: 18982)
Memory: 0B
CGroup: /system.slice/Portal.service
这是我的服务文件:
[Unit]
Description=Portal
[Service]
WorkingDirectory=/home/buson/ftp/Portal
ExecStart=/usr/bin/dotnet /home/buson/ftp/Portal/ClientPortal.dll
Restart=always
RestartSec=10
SyslogIdentifier=netcore-demo
User=www-data
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
Environment=ASPNETCORE_URLS=http://127.0.0.1:4432
Type=notify
[Install]
WantedBy=multi-user.target
我正在使用 Apache2 并启用了 Portal.service 文件,并且端口也在 82 中运行。