编译安装nginx的配置文件的路径在哪

这个版本不同,位置还是不同的。

我的是nginx-1.9.9版本源码安装,配置文件在conf这个目录里面:

/usr/local/nginx/conf/nginx.conf

如果你找不见也可以搜索:

find/|grepnginx.conf

nginx安装配置 linux_nginx安装配置

php和nginx安装后怎么配置

先安装编译依赖的一些组件

复制代码代码如下:

yuminstallpcrepcre-developensslopenssl-devel-y

1、解压程序包

复制代码代码如下:

tarxfnginx-1.10.0.tar.gz

cdnginx-1.10.0

2、预编译配置参数

复制代码代码如下:

./configure--user=www\

--group=www\

--prefix=/data/server/nginx\

--with-http_stub_status_module\

--without-http-cache\

--with-http_ssl_module\

--with-http_gzip_static_module

3、执行编译

复制代码代码如下:

make&&makeinstall

4、替换配置文件

nginx.conf

userwwwwww;

worker_processes1;

error_log/u01/data/log/nginx/error.logcrit;

pid/u01/data/server/nginx/logs/nginx.pid;

#Specifiesthevalueformaximumfiledescriptorsthatcanbeopenedbythisprocess.

worker_rlimit_nofile65535;

events

useepoll;

worker_connections65535;

http{

includemime.types;

default_typeapplication/octet-stream;

#charsetgb2312;

server_names_hash_bucket_size128;

client_header_buffer_size32k;

large_client_header_buffers432k;

client_max_body_size8m;

sendfileon;

tcp_nopushon;

keepalive_timeout60;

tcp_nodelayon;

fastcgi_connect_timeout300;

fastcgi_send_timeout300;

fastcgi_read_timeout300;

fastcgi_buffer_size64k;

fastcgi_buffers464k;

fastcgi_busy_buffers_size128k;

fastcgi_temp_file_write_size128k;

gzipon;

gzip_min_length1k;

gzip_buffers416k;

gzip_http_version1.0;

gzip_comp_level2;

gzip_typestext/plainapplication/x-javascripttext/cssapplication/xml;

gzip_varyon;

#limit_zonecrawler$binary_remote_addr10m;

log_formatmain'$remote_addr-"$request_time"[$time_local]"$request"'

'"$status"$body_bytes_sent"$http_referer"'

'"$http_user_agent"$http_x_forwarded_for';

log_format'$remote_addr-$remote_user[$time_local]"$request"'

'$status$body_bytes_sent"$http_referer"'

'"$http_user_agent"$http_x_forwarded_for"$request_time"';

include/u01/alidata/server/nginx/conf/vhosts/*.conf;

本回答由提问者推荐

nginx修改配置需要重启吗

nginx更改配置文件后需要重启生效。1、更改配置重启nginx:kill-HUP主进程号或进程号文件路径或者使用cd/usr/local/nginx/sbin./nginx-sreload2、判断配置文件是否正确:nginx-t-c/usr/local/nginx/conf/nginx.conf或者cd/usr/local/nginx/sbin./nginx-t

nginx安装配置 linux_nginx安装配置_02

CentOS系统上,怎么安装nginx

1、安装nginx

安装nginx的linux系统需要联网,通过yum install nginx 可以查找安装。

2、找到相关的依赖包。输入确认完成安装。

3、确认是否安装成功,rpm 查询检索。

4、启动nginx服务。

安装好之后,启动nginx服务。centos7下采用systemctl控制安装。

5、查看端口是否启动,netstat检索nginx网站端口(默认是80)。

6、关闭防火墙,或者开通相应端口。通过其他主机访问,nginx网站页面。

7、nginx的配置文件,主配置文件nginx.conf 。

8、查询nginx的配置,/usr/sbin/nginx -V 可以列出nginx的详细配置。