nginx環境搭建(windows)

2021-07-13 19:40:31 字數 2577 閱讀 3231

d:\nginx-1.11

.1>nginx.exe -h

nginx version: nginx/1.11

.1usage: nginx [-?hvvttq] [-s signal] [-c filename] [-p prefix] [-g directives]

options:

-?,-h : this help

-v : show version and

exit

-v : show version and configure options then

exit

-t : test configuration

andexit

-t : test configuration, dump it and

exit

-q : suppress non-error messages during configuration testing

-s signal : send signal

to a master process: stop, quit, reopen, reload

-p prefix : set prefix path (default: none)

-c filename : set configuration

file (default: conf/nginx.conf)

-g directives : set global directives out

ofconfiguration

file

nginx/windows runs as

a service), and

it can be managed using

the following commands:

nginx -s stop fast shutdown

nginx -s quit graceful shutdown

nginx -s reload changing configuration, starting new worker processes with

anew configuration, graceful shutdown of old worker processes

nginx -s reopen re-opening log

files

啟動nginx:d:\nginx-1.11.1>start nginx.exe然後開啟瀏覽器輸入localhost,可以看到如下:

至此,nginx在windows上面就安裝完畢了。

@echo off

echo starting php fastcgi...

set path=c:\php;%path%

c:\bin

\runhiddenconsole.exe c:\php

\php-cgi.exe -b 127.0.0.1:9123

啟動start-php-fcgi.bat檔案。

配置nginx檔案:nginx.conf。

修改server配置:

server 

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html

# error_page 500

502503

504 /50x.html;

location = /50x.html

# proxy the php scripts to apache listening on 127.0.0.1:80

##location ~ \.php$

# pass the php scripts to fastcgi server listening on 127.0.0.1:9000

# location ~ \.php$

# deny access to .htaccess files, if apache's document root

# concurs with nginx's one

##location ~ /\.ht

}

在root目錄建立index.php

echo

"it works";

然後cmd重啟nginx。

瀏覽器裡面開啟localhost,看到:

至此nginx+php配置完畢。

Tensorflow環境搭建(Windows10)

這兩天都沒更新部落格了,原因無它,就是因為這兩天的業餘時間就用來搭建google大名鼎鼎的深度學習框架了。踩了不少坑啊,因此一定要記錄一下環境的搭建過程。環境 首先,先看看我的環境 當然了,如果是裝cpu版本的話是沒有問題的,對顯示卡沒要求,但是據說顯示卡可以提公升很多的速度啊,沒試過,試試便知道了...

Nginx環境搭建

nginx簡介 官方 安裝啟動 切換到nginx安裝目錄的sbin目錄下,執行 nginx c usr local nginx conf nginx.conf 或者路徑指定完整來啟動 usr local nginx sbin nginx c usr local nginx conf nginx.co...

Nginx環境搭建

nginx安裝 系統平台,centos6.5及以上版本 一 安裝編譯工具及庫檔案 yum y install make zlib zlib devel gcc c libtool openssl openssl devel 二 安裝pcre pcre作用是讓 nginx 支援rewrite 功能wg...