Mercurial > hg > nginx-site
annotate xml/en/docs/howto_build_on_win32.xml @ 2457:3896055c397e
Fixed descriptions of $proxy_protocol_addr and $proxy_protocol_port.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Thu, 31 Oct 2019 15:35:51 +0300 |
parents | f90e68b836c0 |
children | 1e9c2a8c1bf1 |
rev | line source |
---|---|
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
1 <?xml version="1.0"?> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
2 |
580
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
461
diff
changeset
|
3 <!-- |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
461
diff
changeset
|
4 Copyright (C) Nginx, Inc. |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
461
diff
changeset
|
5 --> |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
461
diff
changeset
|
6 |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
7 <!DOCTYPE article SYSTEM "../../../dtd/article.dtd"> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
8 |
853
d1446e47d17d
Unified on the look of titles.
Ruslan Ermilov <ru@nginx.com>
parents:
700
diff
changeset
|
9 <article name="Building nginx on the Win32 platform with Visual C" |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
10 link="/en/docs/howto_build_on_win32.html" |
589 | 11 lang="en" |
2419
f90e68b836c0
Updated OpenSSL version used for win32 builds.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2382
diff
changeset
|
12 rev="16"> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
13 |
121
49443032011c
Unified <section> syntax for "article" and "module" documents.
Ruslan Ermilov <ru@nginx.com>
parents:
119
diff
changeset
|
14 <section name="Prerequisites"> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
15 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
16 <para> |
128
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
17 To build nginx on the <registered>Microsoft Win32</registered> platform you need: |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
18 |
461 | 19 <list type="bullet"> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
20 |
461 | 21 <listitem> |
128
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
22 Microsoft Visual C compiler. <registered>Microsoft Visual Studio</registered> |
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
23 8 and 10 are known to work. |
461 | 24 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
25 |
461 | 26 <listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
27 <link url="http://www.mingw.org/wiki/MSYS">MSYS</link>. |
461 | 28 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
29 |
461 | 30 <listitem> |
128
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
31 Perl, if you want to build <registered>OpenSSL</registered> and nginx with SSL support. |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
32 For example <link url="http://www.activestate.com/activeperl">ActivePerl</link> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
33 or <link url="http://strawberryperl.com">Strawberry Perl</link>. |
461 | 34 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
35 |
461 | 36 <listitem> |
1775
a469e77d446f
Fixed links to Mercurial SCM site.
Ruslan Ermilov <ru@nginx.com>
parents:
1749
diff
changeset
|
37 <link url="https://www.mercurial-scm.org">Mercurial</link> client. |
461 | 38 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
39 |
461 | 40 <listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
41 <link url="http://www.pcre.org">PCRE</link>, <link url="http://zlib.net">zlib</link> |
118
b2462c2e2e47
o OpenSSL, Visual Studio, Subversion, Win32 are trademarks.
Maxim Konovalov <maxim@nginx.com>
parents:
117
diff
changeset
|
42 and <link url="http://www.openssl.org">OpenSSL</link> libraries sources. |
461 | 43 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
44 </list> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
45 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
46 </para> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
47 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
48 </section> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
49 |
121
49443032011c
Unified <section> syntax for "article" and "module" documents.
Ruslan Ermilov <ru@nginx.com>
parents:
119
diff
changeset
|
50 <section id="build_steps" |
49443032011c
Unified <section> syntax for "article" and "module" documents.
Ruslan Ermilov <ru@nginx.com>
parents:
119
diff
changeset
|
51 name="Build steps"> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
52 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
53 <para> |
889
675f5c67b45c
Source code repository switch to Mercurial.
Maxim Dounin <mdounin@mdounin.ru>
parents:
859
diff
changeset
|
54 Ensure that paths to Perl, Mercurial and MSYS bin directories are added to |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
55 PATH environment variable before you start build. To set Visual C environment |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
56 run vcvarsall.bat script from Visual C directory. |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
57 </para> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
58 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
59 <para> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
60 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
61 To build nginx: |
461 | 62 <list type="bullet"> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
63 |
461 | 64 <listitem> |
128
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
65 Start MSYS bash. |
461 | 66 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
67 |
461 | 68 <listitem> |
889
675f5c67b45c
Source code repository switch to Mercurial.
Maxim Dounin <mdounin@mdounin.ru>
parents:
859
diff
changeset
|
69 Check out nginx sources from the hg.nginx.org repository. For example: |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
70 <programlisting> |
889
675f5c67b45c
Source code repository switch to Mercurial.
Maxim Dounin <mdounin@mdounin.ru>
parents:
859
diff
changeset
|
71 hg clone http://hg.nginx.org/nginx |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
72 </programlisting> |
461 | 73 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
74 |
461 | 75 <listitem> |
119 | 76 Create a build and lib directories, and unpack zlib, PCRE and OpenSSL libraries |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
77 sources into lib directory: |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
78 <programlisting> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
79 mkdir objs |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
80 mkdir objs/lib |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
81 cd objs/lib |
2382 | 82 tar -xzf ../../pcre-8.43.tar.gz |
1894
d011ffde3760
Updated zlib and PCRE versions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1822
diff
changeset
|
83 tar -xzf ../../zlib-1.2.11.tar.gz |
2419
f90e68b836c0
Updated OpenSSL version used for win32 builds.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2382
diff
changeset
|
84 tar -xzf ../../openssl-1.1.1c.tar.gz |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
85 </programlisting> |
461 | 86 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
87 |
461 | 88 <listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
89 Run configure script: |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
90 <programlisting> |
2060
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
91 auto/configure \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
92 --with-cc=cl \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
93 --with-debug \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
94 --prefix= \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
95 --conf-path=conf/nginx.conf \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
96 --pid-path=logs/nginx.pid \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
97 --http-log-path=logs/access.log \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
98 --error-log-path=logs/error.log \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
99 --sbin-path=nginx.exe \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
100 --http-client-body-temp-path=temp/client_body_temp \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
101 --http-proxy-temp-path=temp/proxy_temp \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
102 --http-fastcgi-temp-path=temp/fastcgi_temp \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
103 --http-scgi-temp-path=temp/scgi_temp \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
104 --http-uwsgi-temp-path=temp/uwsgi_temp \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
105 --with-cc-opt=-DFD_SETSIZE=1024 \ |
2382 | 106 --with-pcre=objs/lib/pcre-8.43 \ |
2060
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
107 --with-zlib=objs/lib/zlib-1.2.11 \ |
2419
f90e68b836c0
Updated OpenSSL version used for win32 builds.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2382
diff
changeset
|
108 --with-openssl=objs/lib/openssl-1.1.1c \ |
2060
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
109 --with-openssl-opt=no-asm \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
110 --with-http_ssl_module |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
111 </programlisting> |
461 | 112 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
113 |
461 | 114 <listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
115 Run make: |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
116 <programlisting> |
2060
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
117 nmake |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
118 </programlisting> |
461 | 119 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
120 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
121 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
122 </list> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
123 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
124 </para> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
125 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
126 </section> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
127 |
121
49443032011c
Unified <section> syntax for "article" and "module" documents.
Ruslan Ermilov <ru@nginx.com>
parents:
119
diff
changeset
|
128 <section id="see_also" |
49443032011c
Unified <section> syntax for "article" and "module" documents.
Ruslan Ermilov <ru@nginx.com>
parents:
119
diff
changeset
|
129 name="See also"> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
130 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
131 <para> |
461 | 132 <list type="bullet"> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
133 |
461 | 134 <listitem> |
374
a413dffb0557
Replaced "a href" with "link doc" / "link url".
Ruslan Ermilov <ru@nginx.com>
parents:
221
diff
changeset
|
135 <link doc="windows.xml"/> |
461 | 136 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
137 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
138 </list> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
139 </para> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
140 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
141 </section> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
142 </article> |