Linux系統(centos7.6)設置fastcgi-mono-server2開機啟動
廣告:
如何安裝xsp,請返回見:http://www.tjsimaide.com/news/detail/20635.html 系統Linux(centos7.6)安裝XSP3.8
Linux系統(centos7.6)設置fastcgi-mono-server2開機啟動:
vim /etc/systemd/system/fastcgi.service [Unit] Description=FastCgi-mono-server for Application After=syslog.target network.target [Service] Type=simple ExecStart=/usr/local/mono/bin/fastcgi-mono-server2 /socket=tcp:9000 /address=127.0.0.1 /applications=/:/var/www/html /port=9000 /loglevels=Error /logfile=/var/log/nginx/xsp.log & Restart=always [Install] WantedBy=multi-user.target
說明:
network.target代表有網路,network-online.target代表一個連通著的網絡。
加載服務器配置文件:
systemctl daemon-reload
systemctl status fastcgi.service 查看服務狀態
systemctl stop fastcgi.service 停止服務
systemctl start fastcgi.service 開啟服務
systemctl stop fastcgi 停止服務
systemctl start fastcgi 開啟服務
設為開機自動啟動:
systemctl daemon-reload systemctl start fastcgi.service systemctl enable fastcgi
systemctl status fastcgi.service
Loaded: loaded (/etc/systemd/system/fastcgi.service; disabled; vendor preset: disabled) 禁用狀態
Loaded: loaded (/etc/systemd/system/fastcgi.service; enabled; vendor preset: disabled) 啟用自啟動狀態
請開啟xsp調試:
/loglevels=Error /logfile=/var/log/nginx/xsp.log 這兩個要同時設置才會顯示詳細出錯信息 &表示該命令在后臺運行
/usr/local/mono/bin/fastcgi-mono-server2 /socket=tcp:9000 /address=127.0.0.1 /applications=/:/var/www/html /port=9000 /loglevels=Error /logfile=/var/log/nginx/xsp.log &
查看服務器已開啟的端口:
netstat -lntp
廣告: