Introduction: This is a detailed page of nginx, PHP for window 7 (64bit) install. It introduces PHP, related knowledge, skills, experience, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 340857 'rolling = 'no'>
I installed a 64-bit Windows 7 system recently. I couldn't use any other environment. I 'd like to reconfigure the environment and take a note.
Download nginx and PHP (nginx32-bit integration)
PHP for window 64bit URL: If eclipse uses 64-bit PHP, remember to use 64-bit PHP. Otherwise, debug is useless.
Http://windows.php.net/downloads/qa/archives/
When downloading xdebug, remember to download ts. Otherwise, loading fails. Zend debug automatically has no 64-bit
PHP 5.3 vc9 TS (64 bit)
Xdebug:
Http://xdebug.org/download.php
PHP. ini configuration:
# Some PHP extensions do not provide 64-bit DLL libraries, such as sockets. Some of them send me one. Others are configured according to their own needs.
Zend_extension = "F: // web server/php-5.3.1/EXT/php_xdebug-2.1.1-5.3-vc9-x86_64.dll"
Xdebug. remote_autostart = true
Xdebug. remote_enable = true
Xdebug. remote_port = 16000
Xdebug. profiler_enable = true
Xdebug. profiler_output_dir = "F:/Web server/Web Temp"
Although the version is ts, zend_extension cannot use zend_extension_ts. Otherwise, PHP cannot load the extension.
Modify the xdebug port listening of eclipse to 16000.
Select Show super globals in varibable view, accept remote session (JIT) bit any (meaning listening to port 16000 of the local address)
You also need to add a PHP extension to eclipse and other operations.
To install Aptana, uncheck this option. Select only Aptana core and Aptana plugin.
When PDT runs debug, path Errors often occur, leading to the failure of debug ~
You can use
Http://files.xiaogui.org/eclipse-indigo/YaHei.Consolas.1.12.rar
This font
Compile the startup script:
Do not install the service when installing MySQL, because the script for starting the service under win7 requires administrator permissions, Which is troublesome.
@ Echo off
: MEMU
CLS
Echo 1. Start Web
Echo 2. Disable Web
Echo 3. Exit
Set/p s = "Please select :"
If "% S %" = "1" Goto start
If "% S %" = "2" Goto stop
If "% S %" = "3" Exit
: Start
Echo starts nginx
F:
Cd "F:/Web server/nginx-1.0.5 /"
Start nginx.exe
Echo starts PHP
"F:/Web server/runhiddenconsole.exe" "F:/Web server/php-5.3.1/php-cgi.exe"-B 127.0.0.1: 9000-c "F:/Web server/php-5.3.1/PHP. ini"
Echo starts MySQL
"F:/Web server/runhiddenconsole.exe" "F:/Web server/MySQL Server 5.5/bin/mysqld.exe"
ECHO started
Pause
Goto MEMU
: Stop
Echo disable nginx
Taskkill/f/IM nginx.exe> NUL
Echo close PHP
Taskkill/f/IM php-cgi.exe> NUL
Echo closes MySQL
Taskkill/f/IM mysqld.exe> NUL
Echo disabled
Pause
Goto MEMU
Attached to runhiddenconsole.exe (hide the tool used by CMD)
Modify the nginx configuration file, add a virtual host, PHP, etc. phpMyAdmin can create a virtual host. It seems that the alias cannot be placed in the directory thought by the root user and no permission error is reported.
1 server {
2 listen 8080;
3 SERVER_NAME localhost;
4
5 # charset koi8-r;
6
7 # access_log logs/host. Access. Log main;
8
9 location /{
10 root D:/users/webdoc/Other;
11 index. php index.html index.htm;
12}
13
14 # error_page 404/404 .html;
15
16 # redirect server error pages to the static page/50x.html
17 #
18 error_page 500 502 503 504/50 x.html;
19 location =/50x.html {
20 root HTML;
21}
22
23 # proxy the PHP scripts to Apache listening on 127.0.0.1: 80
24 #
25 # location ~ \. Php $ {
26 # proxy_pass http: // 127.0.0.1;
27 #}
28
29 # pass the PHP scripts to FastCGI server listening on 127.0.0.1: 9000
30 #
31 location ~ \. Php $ {
32 root D:/users/webdoc/Other;
33 fastcgi_pass 127.0.0.1: 9000;
34 fastcgi_index. php;
35 fastcgi_param script_filename D:/users/webdoc/other $ fastcgi_script_name;
36 include fastcgi_params;
37}
38
39 # deny access to. htaccess files, if Apache's document root
40 # concurs with nginx's one
41 #
42 # location ~ /\. Ht {
43 # deny all;
44 #}
45}
46
47 server {
48 listen 80;
49 SERVER_NAME localhost;
50
51 # charset koi8-r;
52
53 # access_log logs/host. Access. Log main;
54
55 location /{
56 root D:/users/webdoc/web;
57 index. php index.html index.htm;
58}
59
60 # error_page 404/404 .html;
61
62 # redirect server error pages to the static page/50x.html
63 #
64 error_page 500 502 503 x.html;
65 location =/50x.html {
66 root HTML;
67}
68
69 # proxy the PHP scripts to Apache listening on 127.0.0.1: 80
70 #
71 # location ~ \. Php $ {
72 # proxy_pass http: // 127.0.0.1;
73 #}
74
75 # pass the PHP scripts to FastCGI server listening on 127.0.0.1: 9000
76 #
77 location ~ \. Php $ {
78 root D:/users/webdoc/web;
79 fastcgi_pass 127.0.0.1: 9000;
80 fastcgi_index. php;
81 fastcgi_param script_filename D:/users/webdoc/Web $ fastcgi_script_name;
82 include fastcgi_params;
83}
84
85 # deny access to. htaccess files, if Apache's document root
86 # concurs with nginx's one
87 #
88 # location ~ /\. Ht {
89 # deny all;
90 #}
91}
Add two hosts. Pay attention to the red part.
Love J2EE follow Java Michael Jackson video station JSON online tools
Http://biancheng.dnbcw.info/php/340857.html pageno: 7.