1. 查看是否安装检查状态模块;[root@localhost ~]# nginx -V nginx version: nginx/1.12.2 built by gcc 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) configure arguments: --prefix=/usr/local/nginx --with-http_sub_module2
nginx配置反向代理示例
清空之前配置文件;# > /usr/local/nginx/conf/nginx.conf# vim /usr/local/nginx/conf/nginx.confuser nobody nobody; worker_processes 2; error_log /usr/local/nginx/logs/nginx_error.log c
编写nginx启动脚本,命令如下;vim /etc/init.d/nginx#!/bin/bash# chkconfig: - 30 21# description: http service.# Source Function Library. /etc/init.d/functions# Nginx SettingsNGINX_SBIN="/usr/local/nginx/sbin/
Copyright © 2005-2024 51CTO.COM 版权所有 京ICP证060544号