CentOs 7 安裝 nginx

#安裝
yum install nginx;
#啓動
nginx
nginx stop
nginx -s reload

#查看安裝路徑
whereis nginx
nginx: /usr/sbin/nginx /usr/lib64/nginx /etc/nginx /usr/share/nginx /usr/share/man/man3/nginx.3pm.gz /usr/share/man/man8/nginx.8.gz
cd /etc/nginx

配置httpshtml

server {
    listen 443;
    server_name localhost;
    ssl on;
    root html;
    index index.html index.htm;
    ssl_certificate   cert/xxxxxx.pem;
    ssl_certificate_key  cert/xxxxxxx.key;
    ssl_session_timeout 5m;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    location / {
        root html;
        index index.html index.htm;
        #配置跳轉
        #proxy_pass   http://127.0.0.1:9998;
    }
}
相關文章
相關標籤/搜索