Ubuntu系統(tǒng)Nginx網(wǎng)頁(yè)服務(wù)器搭建
時(shí)間:2023-06-04 00:12:02 | 來(lái)源:網(wǎng)站運(yùn)營(yíng)
時(shí)間:2023-06-04 00:12:02 來(lái)源:網(wǎng)站運(yùn)營(yíng)
Ubuntu系統(tǒng)Nginx網(wǎng)頁(yè)服務(wù)器搭建:1.nginx的安裝網(wǎng)上直接搜索安裝即可
2.安裝完成之后默認(rèn)是/usr/local/nginx目錄
3.修改conf/nginx.conf文件的listen等,如果需要使用https將https功能打開,配置證書路徑
# HTTPS server
server {
listen 4444 ssl;
server_name localhost;
ssl_certificate /home/jackhou/JackHou/https/CloudCA2048/server.crt;
ssl_certificate_key /home/jackhou/JackHou/https/CloudCA2048/server_private.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
root html;
index index.html index.htm;
}
}
4.網(wǎng)頁(yè)文件放在/usr/local/nginx/html下,記得修改權(quán)限
關(guān)鍵詞:服務(wù),系統(tǒng)