Re: 答复: 答复: Building Nginx from source for Windows
I followed instruction on http://nginx.org/en/docs/howto_build_on_win32.html. Once I run "nmake -f objs/Makefile", I got the following error: $ nmake -f objs/Makefile Microsoft (R) Program Maintenance Utility Version 14.00.24210.0 Copyright (C) Microsoft Corporation. All rights reserved. "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\nmake.exe" - f auto/lib/pcre/makefile.msvc PCRE="objs/lib/pcre-8.40" pcre.h Microsoft (R) Program Maintenance Utility Version 14.00.24210.0 Copyright (C) Microsoft Corporation. All rights reserved. cd objs/lib/pcre-8.40 NMAKE : fatal error U1077: 'cd' : return code '0x1' Stop. NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 14.0 \VC\bin\nmake.exe"' : return code '0x2' Stop. Please help me out. David On Thu, Aug 3, 2017 at 12:41 AM, 四弦 <i...@zby.io> wrote: > Hello, > > It's no problem,like any other program built on Windows. > ------ > *发件人:* nginx <nginx-boun...@nginx.org> 代表 David Woodstuck < > leeon2...@gmail.com> > *发送时间:* 2017年8月3日 9:15:31 > *收件人:* nginx@nginx.org > *主题:* Re: 答复: Building Nginx from source for Windows > > If I build Nginx by following instructions on http://nginx.org/en/docs/ > howto_build_on_win32.html on one Window machine, Can I copy it on this > machine and paste it on another Window machine and use it? > > Thanks, > > David > > On Wed, Aug 2, 2017 at 1:05 AM, 四弦 <i...@zby.io> wrote: > >> Hello, >> >> The binary program built for Linux can't run directly on Windows.And the >> source of nginx is called a 'tarball',whose file structure is fit for >> Linux.To build it,you need Linux build tool chains. >> >> The best solution is Cygwin,which is a program that allow you to use >> POSIX programs on Windows.Or if you use Windows10(Build 14393 and >> higher),you can consider to use Linux Subsystem On Windows. >> >> >> -- >> *发件人:* nginx <nginx-boun...@nginx.org> 代表 David Woodstuck < >> leeon2...@gmail.com> >> *发送时间:* 2017年8月2日 12:35:45 >> *收件人:* nginx@nginx.org >> *主题:* Building Nginx from source for Windows >> >> I have two questions: >> >> 1. How do I build Nginx from source for Windows? >> >> 2. If I can build Nginx from source for one Window OS, can I copy Nginx >> into another Windows? >> >> 3. I have already build Nginx from for Linux because I need this module - >> https://github.com/yaoweibin/ngx_http_substitutions_filter_module. The >> build processs is the same for Linux and Windows(http://nginx.org/en/do >> cs/configure.html). >> Building nginx from Sources <http://nginx.org/en/docs/configure.html> >> nginx.org >> Building nginx from Sources. The build is configured using the configure >> command. It defines various aspects of the system, including the methods >> nginx is allowed to ... >> >> <https://github.com/yaoweibin/ngx_http_substitutions_filter_module> >> GitHub - yaoweibin/ngx_http_substitutions_filter_module: a ... >> <https://github.com/yaoweibin/ngx_http_substitutions_filter_module> >> github.com >> ngx_http_substitutions_filter_module - a filter module which can do both >> regular expression and fixed string substitutions for nginx >> >> >> >> Thanks, >> >> David >> >> ___ >> nginx mailing list >> nginx@nginx.org >> http://mailman.nginx.org/mailman/listinfo/nginx >> > > > ___ > nginx mailing list > nginx@nginx.org > http://mailman.nginx.org/mailman/listinfo/nginx > ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Re: 答复: Building Nginx from source for Windows
If I build Nginx by following instructions on http://nginx.org/en/docs/howto_build_on_win32.html on one Window machine, Can I copy it on this machine and paste it on another Window machine and use it? Thanks, David On Wed, Aug 2, 2017 at 1:05 AM, 四弦 <i...@zby.io> wrote: > Hello, > > The binary program built for Linux can't run directly on Windows.And the > source of nginx is called a 'tarball',whose file structure is fit for > Linux.To build it,you need Linux build tool chains. > > The best solution is Cygwin,which is a program that allow you to use POSIX > programs on Windows.Or if you use Windows10(Build 14393 and higher),you can > consider to use Linux Subsystem On Windows. > > > -- > *发件人:* nginx <nginx-boun...@nginx.org> 代表 David Woodstuck < > leeon2...@gmail.com> > *发送时间:* 2017年8月2日 12:35:45 > *收件人:* nginx@nginx.org > *主题:* Building Nginx from source for Windows > > I have two questions: > > 1. How do I build Nginx from source for Windows? > > 2. If I can build Nginx from source for one Window OS, can I copy Nginx > into another Windows? > > 3. I have already build Nginx from for Linux because I need this module - > https://github.com/yaoweibin/ngx_http_substitutions_filter_module. The > build processs is the same for Linux and Windows(http://nginx.org/en/ > docs/configure.html). > Building nginx from Sources <http://nginx.org/en/docs/configure.html> > nginx.org > Building nginx from Sources. The build is configured using the configure > command. It defines various aspects of the system, including the methods > nginx is allowed to ... > > <https://github.com/yaoweibin/ngx_http_substitutions_filter_module> > GitHub - yaoweibin/ngx_http_substitutions_filter_module: a ... > <https://github.com/yaoweibin/ngx_http_substitutions_filter_module> > github.com > ngx_http_substitutions_filter_module - a filter module which can do both > regular expression and fixed string substitutions for nginx > > > > Thanks, > > David > > ___ > nginx mailing list > nginx@nginx.org > http://mailman.nginx.org/mailman/listinfo/nginx > ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Building Nginx from source for Windows
I have two questions: 1. How do I build Nginx from source for Windows? 2. If I can build Nginx from source for one Window OS, can I copy Nginx into another Windows? 3. I have already build Nginx from for Linux because I need this module - https://github.com/yaoweibin/ngx_http_substitutions_filter_module. The build processs is the same for Linux and Windows( http://nginx.org/en/docs/configure.html). Thanks, David ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Nginx installation from source for Windows
I have two questions: 1. How do I install Nginx from source for Windows? 2. If I can install Nginx from source for one Window OS, can I copy Nginx into another Windows? Thanks, David ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
conditional proxy_pass
I just use Nginx for a couple of weeks. I have the following questions. I hope I can get your help. I have a big web application whose urls are dev01.mydomain.com, dev02.mydomain and dev03.mydomain.com. I like to use Nginx to deliver this application for its users. On each page, there are a lot of iframes whose src can be one of dev01.mydomain.com, dev02.mydomain and dev03.mydomain.com. I like to use following conf to achieve one url for its users: server { listen 80; server_name localhost; #charset koi8-r; #access_log /var/log/nginx/log/host.access.log main; location / { root /usr/share/nginx/html; index index.html index.htm; proxy_pass http://dev01.mydomain.com/; subs_filter 'http://dev02.mydomain.com/(.*)' ' http://dev01.mydomain.com/?http://dev02.mydomain.com/$1'; subs_filter 'http://dev03.mydomain.com/(.*)' ' http://dev01.mydomain.com/?http://dev03.mydomain.com/$1'; } } My requirements are: (1). Request with url - http://www.mydomain.com/?http://... will proxy to http://dev02.mydomain.com/ or http://dev03.mydomain.com/ depending on a value after ? (2). Other request will proxy to http://dev01.mydomain.com/. How do I achieve these requirements? Thanks, David ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
How to solid three urls into one url for its users
I just use Nginx for a couple of weeks. I have the following questions. I hope I can get your help. I have a big web application whose urls are dev01.mydomain.com, dev02.mydomain and dev03.mydomain.com. I like to use Nginx to deliver this application for its users. On each page, there are a lot of iframes whose src can be one of dev01.mydomain.com, dev02.mydomain and dev03.mydomain.com. I like to use following conf to achieve one url for its users: server { listen 80; server_name localhost; #charset koi8-r; #access_log /var/log/nginx/log/host.access.log main; location / { root /usr/share/nginx/html; index index.html index.htm; proxy_pass http://dev01.mydomain.com/; subs_filter 'http://dev02.mydomain.com/(.*)' ' http://dev01.mydomain.com/?http://dev02.mydomain.com/$1'; subs_filter 'http://dev03.mydomain.com/(.*)' ' http://dev01.mydomain.com/?http://dev03.mydomain.com/$1'; } } My requirements are: (1). Request with url - http://www.mydomain.com/?http://... will proxy to http://dev02.mydomain.com/ or http://dev03.mydomain.com/ depending on a value after ? (2). Other request will proxy to http://dev01.mydomain.com/. How do I achieve these requirements? Thanks, ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
Re: how to install nginx_substitutions_filter in existing Nginx
Thank Francis for your help. I just install nginx_substitutions_filter from source. It works well as expected. I have a special requirement I will describe below. I have a host Nginx server running in port: 9000, This Nginx will proxy http://www.myserver.com:10085/. Some pages from http://www.myserver.com:10085/ have a lot of iframes whose srcs are http://www.myserver.com:10088/ and http://www.myserver.com:10089/. I cannot get access to http://www.myserver.com:10085/, http://www.myserver.com:10088/ and http://www.myserver.com:10089/. I want the pages from http://www.myserver.com:10085/ to have CORS( add_header 'Access-Control-Allow-Origin' '*'). How do I achieve this? Thanks, David On Tue, Jun 6, 2017 at 1:21 PM, Francis Daly <fran...@daoine.org> wrote: > On Tue, Jun 06, 2017 at 12:27:04AM -0400, David Woodstuck wrote: > > Hi there, > > > I am a new Nginx user. I just install Nginx 1.12. I like to > > use nginx_substitutions_filter. I cannot figure out how to install > > nginx_substitutions_filter in previously existing Nginx. > > You (probably) don't. > > https://www.nginx.com/resources/admin-guide/installing-nginx-open-source/ > > describes how to build from source in general; > > https://www.nginx.com/resources/wiki/modules/substitutions/ > > describes how to include the modules you mention, in specific. > > > Should I unstall Nginx first? > > You can run "nginx -V" to see the "configure" arguments that were used > to create your current version. Then add the extra bits that you want. > > Depending on precisely how you installed your current nginx, you probably > *do* want to uninstall it before installing the new one. > > > If your current nginx supports dynamic modules (1.12 does), and if > this extra module you want supports being built as a dynamic module, > then you may be able to build-and-add the module. > > I suspect that in your case, you will probably find more clear > documentation on how to build-and-maintain a new nginx than how to > build-and-maintain the extra module. > > I also suspect that, based on parallel mail threads, you probably do > not need the extra module. > > It is still useful to know how to add a module that you want, so it is > certainly worth trying it on a test system, at least. > > Good luck with it, > > f > -- > Francis Dalyfran...@daoine.org > ___ > nginx mailing list > nginx@nginx.org > http://mailman.nginx.org/mailman/listinfo/nginx > ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
How to do proxy in this case
I have one proxy server(nginx) - such as nginx.mycom.com and three upstream servers - name1.mycom.com, name2.mycom.com name3.mycom.com for my one application. Contents from upstream servers have a lot of iframes which have different domains. I want to allow XSS for these different domains. I don't know how to achieve XSS for this application. For instance, when contents from name1.mycom.com has two iframes that their src are name1.mycom.com/content1 and name2.mycom.com/content2, can I do the following to achieve XSS? (1). replace name1.mycom.com/content1 with nginx.mycom.com/content1 replace name2.mycom.com/content1 with nginx.mycom.com/content2 add_header for XSS (2). When nginx.mycom.com/content1 request is coming, proxy to name1.mycom.com/content1 add_header for XSS (3). When nginx.mycom.com/content2 request is coming, proxy to name2.mycom.com/content2 add_header for XSS I only have limited knowledge of Nignx. I like to use NginxScript to achieve this goal. Can I do it in Nginx. I do appreciate your suggestion and some examples. David ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx
How to proxy
I have one proxy server(nginx) - such as nginx.mycom.com and three upstream servers - name1.mycom.com, name2.mycom.com name3.mycom.com for my one application. Contents from upstream servers have a lot of iframes which have different domains. I want to allow XSS for these different domains. I don't know how to achieve XSS for this application. For instance, when contents from name1.mycom.com has two iframes that their src are name1.mycom.com/content1 and name2.mycom.com/content2, can I do the following to achieve XSS? (1). replace name1.mycom.com/content1 with nginx.mycom.com/content1 replace name2.mycom.com/content1 with nginx.mycom.com/content2 add_header for XSS (2). When nginx.mycom.com/content1 request is coming, proxy to name1.mycom.com/content1 add_header for XSS (3). When nginx.mycom.com/content2 request is coming, proxy to name2.mycom.com/content2 add_header for XSS I only have limited knowledge of Nignx. I like to use NginxScript to achieve this goal. Can I do it in Nginx. I do appreciate your suggestion and some examples. David ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx