启动、停止nginx
cd /usr/local/nginx/sbin/
./nginx
./nginx -s stop
./nginx -s quit
./nginx -s reload
开启反向代理权限
sudo setsebool httpd_can_network_connect 1
设置https
1 添加https模块
./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module --with-http_ssl_module
2.覆盖配置文件
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
3.配置
# HTTPS server
#
server {
listen 80 default backlog=2048;
listen 443 ssl;
server_name stoge.cn;
ssl_certificate cert.pem;
ssl_certificate_key cert.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
}
}
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。