nginx命令
cmd窗口:进入nginx解压目录
开启:start ngnix
停止:nginx -s stop
重启:nginx -s reload
主要配置红色部分,第一部分的意思是
10.100.14.169:8081/ajax/
替换成:
10.210.33.113:9090/
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 8081;
server_name 10.100.14.169;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
#add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS,PUT,DELETE';
#charset koi8-r;
#access_log logs/host.access.log main;
location /ajax/ {
#root html;
#index index.html index.htm;
proxy_pass http://10.210.33.113:9090/;
}
location /aplus_ote_ui {
#root html;
#index index.html index.htm;
proxy_pass http://localhost:8181/aplus_ote_ui;
}
#location / {
# #root html;
# #index index.html index.htm;
# proxy_pass http://localhost:8181;
# #proxy_pass http://www.baidu.com;
#}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://www.baidu.com;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# 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 / {
# root html;
# index index.html index.htm;
# }
#}
}
相关推荐
nginx window下的静态文件服务器 location /file/ { alias D:/upload/test/; #换成你的本地磁盘位置 index autoindex on; }
Nginx在Window下安装实现微信公众号反向代理配置
Windows下Nginx配置SSL实现Https访问(包含证书生成)
nginx配置修改后运行此脚本启动nginx。 其脚本的作用往往是简化了启动的便利
原来一直以为nginx只能在Linux下搭建,最近查了些资料才恍然大悟,Windows下其实也可以跑nginx。当你的网站访问量越来越高的时候,一台服务器已经没有办法承受流量压力,后果可想而知,怎么办呢?那就增加几台 ...
前因 搭建一个网站传统的方法是使用一个web服务器去解析文件入口文件,如使用Nginx,Apache解析到对应的入口文件,但是随着技术的发展,...Nginx端口映射配置 server { listen 80; server_name rbac.dev-lu.com; #
4.window下负载均衡配置将nginx.conf文件直接覆盖原有的,然后修改server 192.168.1.xxx:端口 max_fails=1 fail_timeout=600s; server 192.168.1.xxx:端口 max_fails=5 fail_timeout=600s; 为你搭建的服务器地址...
nginx 的windows版本,安装配置简单,性能高效
用nginx可以实现非http协议的转发。suse12实测支持sftp、ftp转发
使用nginx实现HLS m3u8点播功能。 包括,nginx安装,mp4、flv切片,测试,跨域问题,nginx集群等等。
(1) Nginx安装配置 - 1 - 1) Nginx安装 - 1 - 2) Nginx配置 - 1 - a)对c:\nginx\conf\nginx.conf文件进行配置: - 1 - b)常用的 Nginx 参数 - 3 - c)静态文件处理 - 4 - d)动态页面请求处理 - 4 - e)下面为nginx....
conf/nginx.conf 为配置文件实例 RTMP监听 1935 端口,启用live 和hls 两个application HTTP监听 8080 端口, * :8080/stat 查看stream状态 * :8080/index.html 为一个直播播放与直播发布测试器 * :8080/vod....
nginx for windows下载以及详细安装与配置 1.目前官方 Nginx 并不支持Windows,您只能在包括Linux,UNIX,BSD系统下安装和使用,现在提供nginx for windows下载以及详细安装与配置,供windows下的nginx应用。 2.Nginx ...
nginx -t命令的原始作用是用来验证nginx配置文件格式和配置是否存在异常,通过该命令会输出nginx的配置文件的路径和验证结果,在输出结果中就可以找到当前的nginx的加载的配置文件的地址,如下所示: nginx -t ...
window 版本 nginx 最新版本 一般结合Tomcat 使用 配置信息如下: #运行用户 user www-data; #启动进程,通常设置成和cpu的数量相等 worker_processes 1; #全局错误日志及PID文件 error_log /var/log/nginx/error....
这个套件包是windows X64系统下的php开发套件,包含了PHP7.2.7的TS和NTS...其中已经配置好了PHP-nts + nginx +redis的环境,只需要按里面的说明修改参数就可使用。windows下开发phper的福利,让你能快速搭建开发环境。
window2008下,把nginx加入到服务器管理器中,方便启动和停止、重新启动,只有一个可执行程序和配置问价,总共代码不到10行,非常方便配置,对于使用nginx的小伙伴提高工作效率很有帮助
window服务器版本的nginx,常规版本受限window并发量限制,下载资源后,解压缩,复制nginx-win.conf 命名为 nginx.conf, 运行nginx_basic.exe,相关配置文件根据自己需要个性化定制,自己亲测使用好一段时间。
nginx-1.12.0安装包和配置文件nginx.conf,安装流程请查看我的博客。
同时需要注意的是1.windows下nginx配置文件中的目录请使用“/”,而不是“”做目录分隔2.windows下的nginx只有一个有效的工作进程3.win