Mercurial > hg > nginx-site
annotate xml/en/docs/howto_build_on_win32.xml @ 2718:fb41de2d765a
Added default_server to ssl_reject_handshake example.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 04 May 2021 20:50:55 +0100 |
parents | 1a78bbde103b |
children | bc9c5d11b67c |
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" |
2700
1a78bbde103b
Updated OpenSSL version used for win32 builds.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2682
diff
changeset
|
12 rev="23"> |
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> |
2682 | 27 <link url="https://sourceforge.net/projects/mingw/files/MSYS/">MSYS</link> or |
28 <link url="https://www.msys2.org">MSYS2</link>. | |
461 | 29 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
30 |
461 | 31 <listitem> |
128
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
32 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
|
33 For example <link url="http://www.activestate.com/activeperl">ActivePerl</link> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
34 or <link url="http://strawberryperl.com">Strawberry Perl</link>. |
461 | 35 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
36 |
461 | 37 <listitem> |
1775
a469e77d446f
Fixed links to Mercurial SCM site.
Ruslan Ermilov <ru@nginx.com>
parents:
1749
diff
changeset
|
38 <link url="https://www.mercurial-scm.org">Mercurial</link> client. |
461 | 39 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
40 |
461 | 41 <listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
42 <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
|
43 and <link url="http://www.openssl.org">OpenSSL</link> libraries sources. |
461 | 44 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
45 </list> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
46 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
47 </para> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
48 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
49 </section> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
50 |
121
49443032011c
Unified <section> syntax for "article" and "module" documents.
Ruslan Ermilov <ru@nginx.com>
parents:
119
diff
changeset
|
51 <section id="build_steps" |
49443032011c
Unified <section> syntax for "article" and "module" documents.
Ruslan Ermilov <ru@nginx.com>
parents:
119
diff
changeset
|
52 name="Build steps"> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
53 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
54 <para> |
889
675f5c67b45c
Source code repository switch to Mercurial.
Maxim Dounin <mdounin@mdounin.ru>
parents:
859
diff
changeset
|
55 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
|
56 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
|
57 run vcvarsall.bat script from Visual C directory. |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
58 </para> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
59 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
60 <para> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
61 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
62 To build nginx: |
461 | 63 <list type="bullet"> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
64 |
461 | 65 <listitem> |
128
5530e24f9d58
* reg symbol replaced with 'registered' tags
Sergey Budnevitch <sb@waeme.net>
parents:
123
diff
changeset
|
66 Start MSYS bash. |
461 | 67 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
68 |
461 | 69 <listitem> |
889
675f5c67b45c
Source code repository switch to Mercurial.
Maxim Dounin <mdounin@mdounin.ru>
parents:
859
diff
changeset
|
70 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
|
71 <programlisting> |
889
675f5c67b45c
Source code repository switch to Mercurial.
Maxim Dounin <mdounin@mdounin.ru>
parents:
859
diff
changeset
|
72 hg clone http://hg.nginx.org/nginx |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
73 </programlisting> |
461 | 74 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
75 |
461 | 76 <listitem> |
119 | 77 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
|
78 sources into lib directory: |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
79 <programlisting> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
80 mkdir objs |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
81 mkdir objs/lib |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
82 cd objs/lib |
2511
1e9c2a8c1bf1
Updated OpenSSL and PCRE versions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2419
diff
changeset
|
83 tar -xzf ../../pcre-8.44.tar.gz |
1894
d011ffde3760
Updated zlib and PCRE versions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1822
diff
changeset
|
84 tar -xzf ../../zlib-1.2.11.tar.gz |
2700
1a78bbde103b
Updated OpenSSL version used for win32 builds.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2682
diff
changeset
|
85 tar -xzf ../../openssl-1.1.1k.tar.gz |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
86 </programlisting> |
461 | 87 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
88 |
461 | 89 <listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
90 Run configure script: |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
91 <programlisting> |
2060
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
92 auto/configure \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
93 --with-cc=cl \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
94 --with-debug \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
95 --prefix= \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
96 --conf-path=conf/nginx.conf \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
97 --pid-path=logs/nginx.pid \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
98 --http-log-path=logs/access.log \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
99 --error-log-path=logs/error.log \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
100 --sbin-path=nginx.exe \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
101 --http-client-body-temp-path=temp/client_body_temp \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
102 --http-proxy-temp-path=temp/proxy_temp \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
103 --http-fastcgi-temp-path=temp/fastcgi_temp \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
104 --http-scgi-temp-path=temp/scgi_temp \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
105 --http-uwsgi-temp-path=temp/uwsgi_temp \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
106 --with-cc-opt=-DFD_SETSIZE=1024 \ |
2511
1e9c2a8c1bf1
Updated OpenSSL and PCRE versions.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2419
diff
changeset
|
107 --with-pcre=objs/lib/pcre-8.44 \ |
2060
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
108 --with-zlib=objs/lib/zlib-1.2.11 \ |
2700
1a78bbde103b
Updated OpenSSL version used for win32 builds.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2682
diff
changeset
|
109 --with-openssl=objs/lib/openssl-1.1.1k \ |
2060
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
110 --with-openssl-opt=no-asm \ |
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
111 --with-http_ssl_module |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
112 </programlisting> |
461 | 113 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
114 |
461 | 115 <listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
116 Run make: |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
117 <programlisting> |
2060
237b67ef69a6
Improved win32 build instructions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
2018
diff
changeset
|
118 nmake |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
119 </programlisting> |
461 | 120 </listitem> |
113
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 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
123 </list> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
124 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
125 </para> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
126 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
127 </section> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
128 |
121
49443032011c
Unified <section> syntax for "article" and "module" documents.
Ruslan Ermilov <ru@nginx.com>
parents:
119
diff
changeset
|
129 <section id="see_also" |
49443032011c
Unified <section> syntax for "article" and "module" documents.
Ruslan Ermilov <ru@nginx.com>
parents:
119
diff
changeset
|
130 name="See also"> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
131 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
132 <para> |
461 | 133 <list type="bullet"> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
134 |
461 | 135 <listitem> |
374
a413dffb0557
Replaced "a href" with "link doc" / "link url".
Ruslan Ermilov <ru@nginx.com>
parents:
221
diff
changeset
|
136 <link doc="windows.xml"/> |
461 | 137 </listitem> |
113
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
138 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
139 </list> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
140 </para> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
141 |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
142 </section> |
f9fe7330f8e8
Win32 build instructions added
Sergey Budnevitch <sb@waeme.net>
parents:
diff
changeset
|
143 </article> |