blob: 7cb53ea254a32b906c0079b6a2613f3d23b842e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
|
=encoding utf-8
=head1 Name
howto_build_on_win32 - Building nginx on the Win32 platform with Visual C
=head1 Prerequisites
To build nginx on the Microsoft Win32 E<copy> platform you need:
=over
=item *
Microsoft Visual C compiler. Microsoft Visual Studio E<copy>
8, 10, 17 are known to work.
=item *
L<MSYS|https://sourceforge.net/projects/mingw/files/MSYS/> or
L<MSYS2|https://www.msys2.org>.
=item *
Perl, if you want to build OpenSSL E<copy> and nginx with SSL support.
For example L<ActivePerl|http://www.activestate.com/activeperl>
or L<Strawberry Perl|http://strawberryperl.com>.
=item *
L<Git|https://cli.github.com/> client.
=item *
L<PCRE|http://www.pcre.org>, L<zlib|http://zlib.net>
and L<OpenSSL|http://www.openssl.org> libraries sources.
=back
=head1 Build steps
Ensure that paths to Perl, Git and MSYS bin directories are added to
PATH environment variable before you start build. To set Visual C environment
run vcvarsall.bat script from Visual C directory.
To build nginx:
=over
=item *
Start MSYS bash.
=item *
Check out nginx sources from the GitHub repository:
git clone https://github.com/nginx/nginx.git
=item *
Create a build and lib directories, and unpack zlib, PCRE and OpenSSL libraries
sources into lib directory:
mkdir objs
mkdir objs/lib
cd objs/lib
tar -xzf ../../pcre2-10.39.tar.gz
tar -xzf ../../zlib-1.3.1.tar.gz
tar -xzf ../../openssl-3.0.14.tar.gz
=item *
Run configure script:
auto/configure \
--with-cc=cl \
--with-debug \
--prefix= \
--conf-path=conf/nginx.conf \
--pid-path=logs/nginx.pid \
--http-log-path=logs/access.log \
--error-log-path=logs/error.log \
--sbin-path=nginx.exe \
--http-client-body-temp-path=temp/client_body_temp \
--http-proxy-temp-path=temp/proxy_temp \
--http-fastcgi-temp-path=temp/fastcgi_temp \
--http-scgi-temp-path=temp/scgi_temp \
--http-uwsgi-temp-path=temp/uwsgi_temp \
--with-cc-opt=-DFD_SETSIZE=1024 \
--with-pcre=objs/lib/pcre2-10.39 \
--with-zlib=objs/lib/zlib-1.3.1 \
--with-openssl=objs/lib/openssl-3.0.14 \
--with-openssl-opt=no-asm \
--with-http_ssl_module
=item *
Run make:
nmake
=back
=head1 See also
=over
=item *
L<windows>
=back
|