Ubuntu系统Nginx网页服务器搭建
时间:2023-06-04 00:12:02 | 来源:网站运营
时间:2023-06-04 00:12:02 来源:网站运营
Ubuntu系统Nginx网页服务器搭建:1.nginx的安装网上直接搜索安装即可
2.安装完成之后默认是/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.网页文件放在/usr/local/nginx/html下,记得修改权限