Skip to content

Commit 7db0379

Browse files
authored
Merge pull request #3502 from sanjib2006/v2/dev/issue_3498_remove_nginx
refactor: remove NGINX support from v2 (#3498)
2 parents 2fe3832 + 05dce47 commit 7db0379

35 files changed

+32
-5725
lines changed

Makefile.am

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ test: check
3535
test-regression:
3636
(cd tests && $(MAKE) test-regression)
3737

38-
test-regression-nginx:
39-
(cd tests && $(MAKE) test-regression-nginx)
40-
41-
4238
cppcheck:
4339
@cppcheck \
4440
-j `getconf _NPROCESSORS_ONLN 2>/dev/null || sysctl -n hw.ncpu || echo 1` \
@@ -58,8 +54,7 @@ cppcheck:
5854
--inconclusive \
5955
--template="warning: {file},{line},{severity},{id},{message}" \
6056
--error-exitcode=1 \
61-
standalone/ \
62-
nginx/
57+
standalone/
6358

6459
check-static: cppcheck
6560

apache2/mod_security2.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ TreeRoot DSOLOCAL *conn_write_state_whitelist = 0;
9191
TreeRoot DSOLOCAL *conn_write_state_suspicious_list = 0;
9292

9393

94-
#if defined(WIN32) || defined(VERSION_NGINX)
94+
#if defined(WIN32)
9595
int (*modsecDropAction)(request_rec *r) = NULL;
9696
#endif
9797
static int server_limit, thread_limit;
@@ -235,7 +235,7 @@ int perform_interception(modsec_rec *msr) {
235235
break;
236236

237237
case ACTION_PROXY :
238-
#if !(defined(VERSION_IIS)) && !(defined(VERSION_NGINX)) && !(defined(VERSION_STANDALONE))
238+
#if !(defined(VERSION_IIS)) && !(defined(VERSION_STANDALONE))
239239
if (msr->phase < 3) {
240240
if (ap_find_linked_module("mod_proxy.c") == NULL) {
241241
log_level = 1;
@@ -275,7 +275,7 @@ int perform_interception(modsec_rec *msr) {
275275
/* ENH This does not seem to work on Windows. Is there a
276276
* better way to drop a connection anyway?
277277
*/
278-
#if !defined(WIN32) && !defined(VERSION_NGINX)
278+
#if !defined(WIN32)
279279
{
280280
extern module core_module;
281281
apr_socket_t *csd;
@@ -608,10 +608,10 @@ static apr_status_t change_server_signature(server_rec *s) {
608608
char *server_version = NULL;
609609

610610
/* This is a very particular way to handle the server banner. It is Apache
611-
* only. Stanalone and descendants should address that in its specifics
612-
* implementations, e.g. Nginx module.
611+
* only. Standalone and descendants should address that in its specifics
612+
* implementations, e.g. IIS module.
613613
*/
614-
#if !(defined(VERSION_IIS)) && !(defined(VERSION_NGINX)) && !(defined(VERSION_STANDALONE))
614+
#if !(defined(VERSION_IIS)) && !(defined(VERSION_STANDALONE))
615615
if (new_server_signature == NULL) return 0;
616616

617617
server_version = (char *)apache_get_server_version();

apache2/msc_release.h

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,14 @@
4949
MODSEC_VERSION_SUFFIX
5050

5151
/* Apache Module Defines */
52-
#ifdef VERSION_IIS
53-
#define MODSEC_MODULE_NAME "ModSecurity for IIS (STABLE)"
52+
#if defined(VERSION_IIS)
53+
#define MODSEC_MODULE_NAME "ModSecurity for IIS (STABLE)"
54+
#elif defined(VERSION_STANDALONE)
55+
#define MODSEC_MODULE_NAME "ModSecurity Standalone (STABLE)"
5456
#else
55-
#ifdef VERSION_NGINX
56-
#define MODSEC_MODULE_NAME "ModSecurity for nginx (STABLE)"
57-
#else
58-
#ifdef VERSION_STANDALONE
59-
#define MODSEC_MODULE_NAME "ModSecurity Standalone (STABLE)"
60-
#else
61-
#define MODSEC_MODULE_NAME "ModSecurity for Apache"
62-
#endif
63-
#endif
57+
#define MODSEC_MODULE_NAME "ModSecurity for Apache"
6458
#endif
59+
6560
#define MODSEC_MODULE_VERSION MODSEC_VERSION
6661
#define MODSEC_MODULE_NAME_FULL MODSEC_MODULE_NAME "/" MODSEC_MODULE_VERSION " (http://www.modsecurity.org/)"
6762

apache2/msc_status_engine.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,6 @@ int DSOLOCAL msc_beacon_string (char *beacon_string, int beacon_string_max_len)
361361
modsec = MODSEC_VERSION;
362362
#ifdef VERSION_IIS
363363
apache = "IIS";
364-
#elif VERSION_NGINX
365-
apache = "nginx";
366364
#else
367365
apache = real_server_signature;
368366
#endif

configure.ac

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ fi
189189
# Standalone Module
190190
AC_ARG_ENABLE(standalone-module,
191191
AS_HELP_STRING([--enable-standalone-module],
192-
[Enable building standalone module.]),
192+
[Enable building standalone module (IIS, test server). Note: NGINX support has been removed.]),
193193
[
194194
if test "$enableval" != "no"; then
195195
build_standalone_module=1
@@ -297,7 +297,6 @@ if test "$build_docs" -eq 1; then
297297
AC_CONFIG_FILES([doc/doxygen-apache])
298298
fi
299299
if test "$build_standalone_module" -eq 1; then
300-
AC_CONFIG_FILES([doc/doxygen-nginx])
301300
AC_CONFIG_FILES([doc/doxygen-iis])
302301
AC_CONFIG_FILES([doc/doxygen-standalone])
303302
fi
@@ -937,7 +936,6 @@ AC_CONFIG_FILES([apache2/Makefile])
937936
fi
938937
if test "$build_standalone_module" -ne 0; then
939938
AC_CONFIG_FILES([standalone/Makefile])
940-
AC_CONFIG_FILES([nginx/modsecurity/config])
941939
fi
942940
if test "$build_extentions" -ne 0; then
943941
AC_CONFIG_FILES([ext/Makefile])

doc/Makefile.am

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ iis:
66
$(DOXYGEN) doxygen-iis
77
touch iis.stamp
88

9-
nginx:
10-
$(DOXYGEN) doxygen-nginx
11-
touch nginx.stamp
129

1310
standalone:
1411
$(DOXYGEN) doxygen-standalone
@@ -20,8 +17,8 @@ all-local: apache
2017
endif
2118

2219
if BUILD_STANDALONE_MODULE
23-
all-local: iis nginx standalone
20+
all-local: iis standalone
2421
endif
2522

2623
clean-local:
27-
rm -rf apache iis nginx standalone
24+
rm -rf apache iis standalone

doc/doxygen-apache.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ PROJECT_NUMBER =
4444
# for a project that appears at the top of each page and should give viewer a
4545
# quick idea about the purpose of the project. Keep the description short.
4646

47-
PROJECT_BRIEF = "ModSecurity is an open source, cross platform web application firewall (WAF) engine for Apache, IIS and Nginx that is developed by Trustwave's SpiderLabs. It has a robust event-based programming language which provides protection from a range of attacks against web applications and allows for HTTP traffic monitoring, logging and real-time analysis. With over 10,000 deployments world-wide, ModSecurity is the most widely deployed WAF in existence."
47+
PROJECT_BRIEF = "ModSecurity is an open source, cross platform web application firewall (WAF) engine for Apache and IIS that is developed by Trustwave's SpiderLabs. It has a robust event-based programming language which provides protection from a range of attacks against web applications and allows for HTTP traffic monitoring, logging and real-time analysis. With over 10,000 deployments world-wide, ModSecurity is the most widely deployed WAF in existence."
4848

4949
# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
5050
# in the documentation. The maximum height of the logo should not exceed 55

doc/doxygen-iis.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ PROJECT_NUMBER =
4444
# for a project that appears at the top of each page and should give viewer a
4545
# quick idea about the purpose of the project. Keep the description short.
4646

47-
PROJECT_BRIEF = "ModSecurity is an open source, cross platform web application firewall (WAF) engine for Apache, IIS and Nginx that is developed by Trustwave's SpiderLabs. It has a robust event-based programming language which provides protection from a range of attacks against web applications and allows for HTTP traffic monitoring, logging and real-time analysis. With over 10,000 deployments world-wide, ModSecurity is the most widely deployed WAF in existence."
47+
PROJECT_BRIEF = "ModSecurity is an open source, cross platform web application firewall (WAF) engine for Apache and IIS that is developed by Trustwave's SpiderLabs. It has a robust event-based programming language which provides protection from a range of attacks against web applications and allows for HTTP traffic monitoring, logging and real-time analysis. With over 10,000 deployments world-wide, ModSecurity is the most widely deployed WAF in existence."
4848

4949
# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
5050
# in the documentation. The maximum height of the logo should not exceed 55

0 commit comments

Comments
 (0)