You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streams.apache.org by mf...@apache.org on 2014/06/23 20:22:19 UTC

[15/45] git commit: Fixed bugs in datasift provider and improved datasift conversion to activity objects

Fixed bugs in datasift provider and improved datasift conversion to activity objects


Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/5516471e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/5516471e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/5516471e

Branch: refs/heads/master
Commit: 5516471e1b95ec42c8cd582af6111bdaf7c6778c
Parents: 981343a
Author: rebanks <re...@w2odigital.com>
Authored: Tue Jun 3 14:25:16 2014 -0500
Committer: rebanks <re...@w2odigital.com>
Committed: Tue Jun 3 14:25:16 2014 -0500

----------------------------------------------------------------------
 .../DatasiftTypeConverterProcessor.java         |   60 +-
 .../serializer/DatasiftActivitySerializer.java  |   18 +
 .../DatasiftTweetActivitySerializer.java        |   26 +-
 .../com/datasift/test/DatasiftSerDeTest.java    |    2 +-
 .../DatasiftActivitySerializerTest.java         |   14 +
 .../src/test/resources/amazon_datasift_json.txt |   10 +
 .../src/test/resources/blog_datasift_json.txt   |  719 ++
 .../src/test/resources/board_datasift_json.txt  | 4136 +++++++++++
 .../test/resources/facebook_datasift_json.txt   | 1843 +++++
 .../src/test/resources/part-r-big.json          | 6998 ------------------
 .../resources/rand_sample_datasift_json.txt     | 1547 ++++
 .../resources/random_sample_datasift_json.txt   | 1547 ++++
 .../src/test/resources/reddit_datasift_json.txt |   33 +
 .../test/resources/twitter_datasift_json.txt    | 1000 +++
 .../test/resources/wikipedia_datasift_json.txt  |  243 +
 .../test/resources/youtube_datasift_json.txt    |    7 +
 .../local/tasks/StreamsProviderTask.java        |    4 +-
 17 files changed, 11199 insertions(+), 7008 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/5516471e/streams-contrib/streams-provider-datasift/src/main/java/org/apache/streams/datasift/provider/DatasiftTypeConverterProcessor.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-datasift/src/main/java/org/apache/streams/datasift/provider/DatasiftTypeConverterProcessor.java b/streams-contrib/streams-provider-datasift/src/main/java/org/apache/streams/datasift/provider/DatasiftTypeConverterProcessor.java
index a842786..2e44b80 100644
--- a/streams-contrib/streams-provider-datasift/src/main/java/org/apache/streams/datasift/provider/DatasiftTypeConverterProcessor.java
+++ b/streams-contrib/streams-provider-datasift/src/main/java/org/apache/streams/datasift/provider/DatasiftTypeConverterProcessor.java
@@ -19,8 +19,8 @@ under the License.
 package org.apache.streams.datasift.provider;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.google.common.collect.Lists;
-import org.apache.commons.lang.NotImplementedException;
 import org.apache.streams.core.StreamsDatum;
 import org.apache.streams.core.StreamsProcessor;
 import org.apache.streams.datasift.Datasift;
@@ -74,7 +74,8 @@ public class DatasiftTypeConverterProcessor implements StreamsProcessor {
         } else if (this.outClass.equals(String.class)) {
             this.converter = new StringConverter();
         } else {
-            throw new NotImplementedException("No converter implemented for class : "+this.outClass.getName());
+            LOGGER.warn("Using defaulting datasift converter");
+            this.converter = new DefaultConverter(this.outClass);
         }
     }
 
@@ -108,10 +109,38 @@ public class DatasiftTypeConverterProcessor implements StreamsProcessor {
         public Object convert(Object toConvert, ObjectMapper mapper) {
             try {
                 if(toConvert instanceof String){
-                    LOGGER.debug(mapper.writeValueAsString(mapper.readValue((String) toConvert, Datasift.class)));
+//                    LOGGER.debug(mapper.writeValueAsString(mapper.readValue((String) toConvert, Datasift.class)));
                     return mapper.writeValueAsString(mapper.readValue((String) toConvert, Datasift.class));
+                } else {
+                    if(toConvert.getClass().equals(Activity.class)) { //hack to remove additional properties
+                        ObjectNode node = mapper.convertValue(toConvert, ObjectNode.class);
+                        if(node.has("additionalProperties")) {
+                            ObjectNode additionalProperties = (ObjectNode) node.get("additionalProperties");
+//                            node.put("keywords", additionalProperties.get("keywords"));
+//                            node.put("location", additionalProperties.get("location"));
+//                            node.put("hashtags", additionalProperties.get("hashtags"));
+//                            node.put("datasift", additionalProperties.get("datasift"));
+//                            node.put("user_mentions", additionalProperties.get("user_mentions"));
+                            node.putAll(additionalProperties);
+                            node.remove("additionalProperties");
+                        }
+                        if(node.has("actor")) {
+                            ObjectNode actor = (ObjectNode) node.get("actor");
+                            if(actor.has("additionalProperties")) {
+                                ObjectNode additionalProperties = (ObjectNode) actor.get("additionalProperties");
+//                                actor.put("followers", additionalProperties.get("followers"));
+//                                actor.put("location", additionalProperties.get("location"));
+//                                actor.put("screenName", additionalProperties.get("screenName"));
+//                                actor.put("posts", additionalProperties.get("posts"));
+//                                actor.put("favorites", additionalProperties.get("favorties"));
+                                actor.putAll(additionalProperties);
+                                actor.remove("additionalProperties");
+                            }
+                        }
+                        return mapper.writeValueAsString(node);
+                    } else
+                        return mapper.writeValueAsString(toConvert);
                 }
-                return mapper.writeValueAsString(toConvert);
             } catch (Exception e) {
                 LOGGER.error("Exception while trying to write {} as a String.", toConvert.getClass());
                 LOGGER.error("Exception : {}", e);
@@ -121,4 +150,27 @@ public class DatasiftTypeConverterProcessor implements StreamsProcessor {
 
 
     }
+
+    private class DefaultConverter implements DatasiftConverter {
+
+        private Class clazz;
+
+        public DefaultConverter(Class clazz) {
+            this.clazz = clazz;
+        }
+
+        @Override
+        public Object convert(Object toConvert, ObjectMapper mapper) {
+            try {
+                if(toConvert instanceof String) {
+                    return mapper.readValue((String) toConvert, this.clazz);
+                } else {
+                    return mapper.convertValue(toConvert, this.clazz);
+                }
+
+            } catch (Exception e) {
+                throw new RuntimeException("Failed converting +"+ toConvert.getClass().getName()+" to "+ this.clazz.getName());
+            }
+        }
+    }
 };

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/5516471e/streams-contrib/streams-provider-datasift/src/main/java/org/apache/streams/datasift/serializer/DatasiftActivitySerializer.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-datasift/src/main/java/org/apache/streams/datasift/serializer/DatasiftActivitySerializer.java b/streams-contrib/streams-provider-datasift/src/main/java/org/apache/streams/datasift/serializer/DatasiftActivitySerializer.java
index a9b7db1..c6ff221 100644
--- a/streams-contrib/streams-provider-datasift/src/main/java/org/apache/streams/datasift/serializer/DatasiftActivitySerializer.java
+++ b/streams-contrib/streams-provider-datasift/src/main/java/org/apache/streams/datasift/serializer/DatasiftActivitySerializer.java
@@ -1,3 +1,21 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
 package org.apache.streams.datasift.serializer;
 
 import com.fasterxml.jackson.databind.ObjectMapper;

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/5516471e/streams-contrib/streams-provider-datasift/src/main/java/org/apache/streams/datasift/serializer/DatasiftTweetActivitySerializer.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-datasift/src/main/java/org/apache/streams/datasift/serializer/DatasiftTweetActivitySerializer.java b/streams-contrib/streams-provider-datasift/src/main/java/org/apache/streams/datasift/serializer/DatasiftTweetActivitySerializer.java
index 4931da6..ef48fa6 100644
--- a/streams-contrib/streams-provider-datasift/src/main/java/org/apache/streams/datasift/serializer/DatasiftTweetActivitySerializer.java
+++ b/streams-contrib/streams-provider-datasift/src/main/java/org/apache/streams/datasift/serializer/DatasiftTweetActivitySerializer.java
@@ -1,3 +1,21 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
 package org.apache.streams.datasift.serializer;
 
 
@@ -95,7 +113,8 @@ public class DatasiftTweetActivitySerializer extends DatasiftDefaultActivitySeri
 
         Image profileImage = new Image();
         String profileUrl = null;
-        if(user.getAdditionalProperties() != null) {
+        profileUrl = event.getInteraction().getAuthor().getAvatar();
+        if(profileUrl == null && user.getAdditionalProperties() != null) {
             Object url = user.getAdditionalProperties().get("profile_image_url_https");
             if(url instanceof String)
                 profileUrl = (String) url;
@@ -140,12 +159,12 @@ public class DatasiftTweetActivitySerializer extends DatasiftDefaultActivitySeri
 
         Image profileImage = new Image();
         String profileUrl = null;
-        if(user.getAdditionalProperties() != null) {
+        if(actor.getImage() == null && user.getAdditionalProperties() != null) {
             Object url = user.getAdditionalProperties().get("profile_image_url_https");
             if(url instanceof String)
                 profileUrl = (String) url;
         }
-        if(profileUrl == null) {
+        if(actor.getImage() == null && profileUrl == null) {
             profileUrl = user.getProfileImageUrl();
         }
         profileImage.setUrl(profileUrl);
@@ -189,6 +208,7 @@ public class DatasiftTweetActivitySerializer extends DatasiftDefaultActivitySeri
             Map<String, Object> rebroadcasts = Maps.newHashMap();
             rebroadcasts.put("perspectival", true);
             rebroadcasts.put("count", retweet.getCount());
+            extensions.put("rebroadcasts", rebroadcasts);
         }
 
         if(interaction.getAdditionalProperties() != null) {

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/5516471e/streams-contrib/streams-provider-datasift/src/test/java17/com/datasift/test/DatasiftSerDeTest.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-datasift/src/test/java17/com/datasift/test/DatasiftSerDeTest.java b/streams-contrib/streams-provider-datasift/src/test/java17/com/datasift/test/DatasiftSerDeTest.java
index 785ec8f..084e604 100644
--- a/streams-contrib/streams-provider-datasift/src/test/java17/com/datasift/test/DatasiftSerDeTest.java
+++ b/streams-contrib/streams-provider-datasift/src/test/java17/com/datasift/test/DatasiftSerDeTest.java
@@ -37,7 +37,7 @@ public class DatasiftSerDeTest {
         mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, Boolean.TRUE);
         mapper.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, Boolean.TRUE);
 
-        InputStream is = DatasiftSerDeTest.class.getResourceAsStream("/part-r-big.json");
+        InputStream is = DatasiftSerDeTest.class.getResourceAsStream("/part-r-00000.json");
         InputStreamReader isr = new InputStreamReader(is);
         BufferedReader br = new BufferedReader(isr);
 

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/5516471e/streams-contrib/streams-provider-datasift/src/test/java17/org/apache/streams/datasift/serializer/DatasiftActivitySerializerTest.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-datasift/src/test/java17/org/apache/streams/datasift/serializer/DatasiftActivitySerializerTest.java b/streams-contrib/streams-provider-datasift/src/test/java17/org/apache/streams/datasift/serializer/DatasiftActivitySerializerTest.java
index 0ffee7b..e003435 100644
--- a/streams-contrib/streams-provider-datasift/src/test/java17/org/apache/streams/datasift/serializer/DatasiftActivitySerializerTest.java
+++ b/streams-contrib/streams-provider-datasift/src/test/java17/org/apache/streams/datasift/serializer/DatasiftActivitySerializerTest.java
@@ -1,5 +1,6 @@
 package org.apache.streams.datasift.serializer;
 
+import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.streams.jackson.StreamsJacksonMapper;
 import org.apache.streams.pojo.json.Activity;
@@ -29,6 +30,19 @@ public class DatasiftActivitySerializerTest {
         }
     }
 
+    @Test
+    public void testTwitterConversion() throws Exception {
+        Scanner scanner = new Scanner(DatasiftActivitySerializerTest.class.getResourceAsStream("/twitter_datasift_json.txt"));
+        String line = null;
+        while(scanner.hasNextLine()) {
+            line = scanner.nextLine();
+            testGeneralConversion(line);
+            System.out.println("ORIGINAL -> "+line);
+            System.out.println("ACTIVITY -> "+MAPPER.writeValueAsString(SERIALIZER.deserialize(line)));
+            System.out.println("NODE     -> "+MAPPER.convertValue(SERIALIZER.deserialize(line), JsonNode.class));
+        }
+    }
+
 
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/5516471e/streams-contrib/streams-provider-datasift/src/test/resources/amazon_datasift_json.txt
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-datasift/src/test/resources/amazon_datasift_json.txt b/streams-contrib/streams-provider-datasift/src/test/resources/amazon_datasift_json.txt
new file mode 100644
index 0000000..cfa7b8a
--- /dev/null
+++ b/streams-contrib/streams-provider-datasift/src/test/resources/amazon_datasift_json.txt
@@ -0,0 +1,10 @@
+{"amazon":{"anchor":"531918","author":{"link":"https:\/\/forums.aws.amazon.com\/profile.jspa?userID=292012","name":"kunal_agarwal","username":"kunal_agarwal"},"boardname":"AWS Developer Forums: Discussion Forums","categories":"Software","content":"<div style=\"line-height:1.5; padding-left: 25px;padding-right: 10px;\">\n                Hi,<br \/>\nI have a apache webserver running infront of tomcat...<br \/>\nI see millions of requests in my apache access log..<br \/>\nFrom some IP's there are more than 1 lakhs of requests daily...<br \/>\n<br \/>\nI am not a security expert...But after googling <br \/>\n<br \/>\nI have installed mod_security and mod_evasive...<br \/>\n<br \/>\nPlease help me if this is the only thing I can do...<br \/>\n<br \/>\nOr is there anything else provided by Amazon...<br \/>\n<br \/>\nI though of using iptables to block IPs...But the Ips are changing on a daily basis...<br \/>\n<br \/>\nThanks\n                <\/div>","contenttype":"html","countrycode":"US
 ","crawled":"Wed, 26 Mar 2014 03:04:38 +0000","created_at":"Mon, 24 Mar 2014 23:43:00 +0000","domain":"aws.amazon.com","forumid":"4fb3198a32","forumname":"Category: Amazon Web Services Amazon Elastic Compute Cloud","forumurl":"https:\/\/forums.aws.amazon.com\/forum.jspa?forumID=30","id":"1e3b3ae08871aa00e072922735bfd03a","language":"English","link":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=148679&tstart=25#531918","siteid":"4fb31966d4","thread":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=148679&tstart=25","threadid":"148679","threadstarter":1,"title":"Apache is under DOS attack","topics":"Computers","type":"thread"},"interaction":{"author":{"link":"https:\/\/forums.aws.amazon.com\/profile.jspa?userID=292012","name":"kunal_agarwal","username":"kunal_agarwal"},"content":"<div style=\"line-height:1.5; padding-left: 25px;padding-right: 10px;\">\n                Hi,<br \/>\nI have a apache webserver running infront of tomcat...<br \/>\nI see millions of requests i
 n my apache access log..<br \/>\nFrom some IP's there are more than 1 lakhs of requests daily...<br \/>\n<br \/>\nI am not a security expert...But after googling <br \/>\n<br \/>\nI have installed mod_security and mod_evasive...<br \/>\n<br \/>\nPlease help me if this is the only thing I can do...<br \/>\n<br \/>\nOr is there anything else provided by Amazon...<br \/>\n<br \/>\nI though of using iptables to block IPs...But the Ips are changing on a daily basis...<br \/>\n<br \/>\nThanks\n                <\/div>","contenttype":"html","created_at":"Mon, 24 Mar 2014 23:43:00 +0000","id":"1e3b3ae08871aa00e072922735bfd03a","link":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=148679&tstart=25#531918","schema":{"version":3},"subtype":"thread","title":"Apache is under DOS attack","type":"amazon"},"language":{"confidence":99,"tag":"en","tag_extended":"en"},"salience":{"content":{"sentiment":2},"title":{"entities":[{"name":"Apache","sentiment":-6,"confident":1,"label":"Company","evid
 ence":7,"type":"Company","about":1}],"sentiment":-6,"topics":[{"name":"War","score":0.53363662958145,"additional":"Apache is under DOS attack","hits":0}]}}}
+{"amazon":{"anchor":"531918","author":{"link":"https:\/\/forums.aws.amazon.com\/profile.jspa?userID=292012","name":"kunal_agarwal","username":"kunal_agarwal"},"boardname":"AWS Developer Forums: Discussion Forums","categories":"Software","content":"<div style=\"line-height:1.5; padding-left: 25px;padding-right: 10px;\">\n                Hi,<br \/>\nI have a apache webserver running infront of tomcat...<br \/>\nI see millions of requests in my apache access log..<br \/>\nFrom some IP's there are more than 1 lakhs of requests daily...<br \/>\n<br \/>\nI am not a security expert...But after googling <br \/>\n<br \/>\nI have installed mod_security and mod_evasive...<br \/>\n<br \/>\nPlease help me if this is the only thing I can do...<br \/>\n<br \/>\nOr is there anything else provided by Amazon...<br \/>\n<br \/>\nI though of using iptables to block IPs...But the Ips are changing on a daily basis...<br \/>\n<br \/>\nThanks\n                <\/div>","contenttype":"html","countrycode":"US
 ","crawled":"Sat, 29 Mar 2014 10:48:38 +0000","created_at":"Mon, 24 Mar 2014 23:43:00 +0000","domain":"aws.amazon.com","forumid":"4fb3198a32","forumname":"Category: Amazon Web Services Amazon Elastic Compute Cloud","forumurl":"https:\/\/forums.aws.amazon.com\/forum.jspa?forumID=30","id":"1e3b3ae08871aa00e072ec7f008f23d8","language":"English","link":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=148679&tstart=100#531918","siteid":"4fb31966d4","thread":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=148679&tstart=100","threadid":"148679","threadstarter":1,"title":"Apache is under DOS attack","topics":"Computers","type":"thread"},"interaction":{"author":{"link":"https:\/\/forums.aws.amazon.com\/profile.jspa?userID=292012","name":"kunal_agarwal","username":"kunal_agarwal"},"content":"<div style=\"line-height:1.5; padding-left: 25px;padding-right: 10px;\">\n                Hi,<br \/>\nI have a apache webserver running infront of tomcat...<br \/>\nI see millions of requests
  in my apache access log..<br \/>\nFrom some IP's there are more than 1 lakhs of requests daily...<br \/>\n<br \/>\nI am not a security expert...But after googling <br \/>\n<br \/>\nI have installed mod_security and mod_evasive...<br \/>\n<br \/>\nPlease help me if this is the only thing I can do...<br \/>\n<br \/>\nOr is there anything else provided by Amazon...<br \/>\n<br \/>\nI though of using iptables to block IPs...But the Ips are changing on a daily basis...<br \/>\n<br \/>\nThanks\n                <\/div>","contenttype":"html","created_at":"Mon, 24 Mar 2014 23:43:00 +0000","id":"1e3b3ae08871aa00e072ec7f008f23d8","link":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=148679&tstart=100#531918","received_at":4743642501859712487,"schema":{"version":3},"subtype":"thread","title":"Apache is under DOS attack","type":"amazon"},"language":{"confidence":99,"tag":"en","tag_extended":"en"},"salience":{"content":{"sentiment":2},"title":{"entities":[{"name":"Apache","sentiment":-6,
 "confident":1,"label":"Company","evidence":7,"type":"Company","about":1}],"sentiment":-6,"topics":[{"name":"War","score":0.53363662958145,"additional":"Apache is under DOS attack","hits":0}]}}}
+{"amazon":{"anchor":"532139","author":{"link":"https:\/\/forums.aws.amazon.com\/profile.jspa?userID=292012","name":"kunal_agarwal","username":"kunal_agarwal"},"boardname":"AWS Developer Forums: Discussion Forums","categories":"Software","content":"<div style=\"line-height:1.5; padding-left: 25px;padding-right: 10px;\">\n                Can anyone help me with this...<br \/>\n<br \/>\nIt looks like it's type of syn flood attack...<br \/>\n<br \/>\nthanks...\n                <\/div>","contenttype":"html","countrycode":"US","crawled":"Sat, 29 Mar 2014 10:48:38 +0000","created_at":"Tue, 25 Mar 2014 20:33:00 +0000","domain":"aws.amazon.com","forumid":"4fb3198a32","forumname":"Category: Amazon Web Services Amazon Elastic Compute Cloud","forumurl":"https:\/\/forums.aws.amazon.com\/forum.jspa?forumID=30","id":"1e3b45ca802ea600e07231b5509f040a","language":"English","link":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=148679&tstart=100#532139","siteid":"4fb31966d4","thread":"https:\/
 \/forums.aws.amazon.com\/thread.jspa?threadID=148679&tstart=100","threadid":"148679","title":"Apache is under DOS attack","topics":"Computers","type":"post"},"interaction":{"author":{"link":"https:\/\/forums.aws.amazon.com\/profile.jspa?userID=292012","name":"kunal_agarwal","username":"kunal_agarwal"},"content":"<div style=\"line-height:1.5; padding-left: 25px;padding-right: 10px;\">\n                Can anyone help me with this...<br \/>\n<br \/>\nIt looks like it's type of syn flood attack...<br \/>\n<br \/>\nthanks...\n                <\/div>","contenttype":"html","created_at":"Tue, 25 Mar 2014 20:33:00 +0000","id":"1e3b45ca802ea600e07231b5509f040a","link":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=148679&tstart=100#532139","schema":{"version":3},"subtype":"post","title":"Apache is under DOS attack","type":"amazon"},"language":{"confidence":98,"tag":"en","tag_extended":"en"},"salience":{"content":{"sentiment":-6},"title":{"entities":[{"name":"Apache","sentiment":-6,"c
 onfident":1,"label":"Company","evidence":7,"type":"Company","about":1}],"sentiment":-6,"topics":[{"name":"War","score":0.53363662958145,"additional":"Apache is under DOS attack","hits":0}]}}}
+{"amazon":{"anchor":"532139","author":{"link":"https:\/\/forums.aws.amazon.com\/profile.jspa?userID=292012","name":"kunal_agarwal","username":"kunal_agarwal"},"boardname":"AWS Developer Forums: Discussion Forums","categories":"Software","content":"<div style=\"line-height:1.5; padding-left: 25px;padding-right: 10px;\">\n                Can anyone help me with this...<br \/>\n<br \/>\nIt looks like it's type of syn flood attack...<br \/>\n<br \/>\nthanks...\n                <\/div>","contenttype":"html","countrycode":"US","crawled":"Wed, 26 Mar 2014 03:04:38 +0000","created_at":"Tue, 25 Mar 2014 20:33:00 +0000","domain":"aws.amazon.com","forumid":"4fb3198a32","forumname":"Category: Amazon Web Services Amazon Elastic Compute Cloud","forumurl":"https:\/\/forums.aws.amazon.com\/forum.jspa?forumID=30","id":"1e3b45ca802ea600e0724270bd005ab0","language":"English","link":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=148679&tstart=25#532139","siteid":"4fb31966d4","thread":"https:\/\
 /forums.aws.amazon.com\/thread.jspa?threadID=148679&tstart=25","threadid":"148679","title":"Apache is under DOS attack","topics":"Computers","type":"post"},"interaction":{"author":{"link":"https:\/\/forums.aws.amazon.com\/profile.jspa?userID=292012","name":"kunal_agarwal","username":"kunal_agarwal"},"content":"<div style=\"line-height:1.5; padding-left: 25px;padding-right: 10px;\">\n                Can anyone help me with this...<br \/>\n<br \/>\nIt looks like it's type of syn flood attack...<br \/>\n<br \/>\nthanks...\n                <\/div>","contenttype":"html","created_at":"Tue, 25 Mar 2014 20:33:00 +0000","id":"1e3b45ca802ea600e0724270bd005ab0","link":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=148679&tstart=25#532139","received_at":4743641321202510935,"schema":{"version":3},"subtype":"post","title":"Apache is under DOS attack","type":"amazon"},"language":{"confidence":98,"tag":"en","tag_extended":"en"},"salience":{"content":{"sentiment":-6},"title":{"entities":[{"n
 ame":"Apache","sentiment":-6,"confident":1,"label":"Company","evidence":7,"type":"Company","about":1}],"sentiment":-6,"topics":[{"name":"War","score":0.53363662958145,"additional":"Apache is under DOS attack","hits":0}]}}}
+{"amazon":{"anchor":"532169","author":{"link":"https:\/\/forums.aws.amazon.com\/profile.jspa?userID=292012","name":"kunal_agarwal","username":"kunal_agarwal"},"boardname":"AWS Developer Forums: Discussion Forums","categories":"Software","content":"<div style=\"line-height:1.5; padding-left: 25px;padding-right: 10px;\">\n                Will somepne from amazon respond to this...???<br \/>\n<br \/>\nDo they have something at their end to prevent these half opened http requests...???\n                <\/div>","contenttype":"html","countrycode":"US","crawled":"Sat, 29 Mar 2014 10:48:38 +0000","created_at":"Wed, 26 Mar 2014 01:13:00 +0000","domain":"aws.amazon.com","forumid":"4fb3198a32","forumname":"Category: Amazon Web Services Amazon Elastic Compute Cloud","forumurl":"https:\/\/forums.aws.amazon.com\/forum.jspa?forumID=30","id":"1e3b483c5977a600e072fa2485801888","language":"English","link":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=148679&tstart=100#532169","siteid":"4fb3
 1966d4","thread":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=148679&tstart=100","threadid":"148679","title":"Apache is under DOS attack","topics":"Computers","type":"post"},"interaction":{"author":{"link":"https:\/\/forums.aws.amazon.com\/profile.jspa?userID=292012","name":"kunal_agarwal","username":"kunal_agarwal"},"content":"<div style=\"line-height:1.5; padding-left: 25px;padding-right: 10px;\">\n                Will somepne from amazon respond to this...???<br \/>\n<br \/>\nDo they have something at their end to prevent these half opened http requests...???\n                <\/div>","contenttype":"html","created_at":"Wed, 26 Mar 2014 01:13:00 +0000","id":"1e3b483c5977a600e072fa2485801888","link":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=148679&tstart=100#532169","received_at":4743642502084954161,"schema":{"version":3},"subtype":"post","title":"Apache is under DOS attack","type":"amazon"},"language":{"confidence":99,"tag":"en","tag_extended":"en"},"salienc
 e":{"content":{"sentiment":0},"title":{"entities":[{"name":"Apache","sentiment":-6,"confident":1,"label":"Company","evidence":7,"type":"Company","about":1}],"sentiment":-6,"topics":[{"name":"War","score":0.53363662958145,"additional":"Apache is under DOS attack","hits":0}]}}}
+{"amazon":{"anchor":"532280","author":{"link":"https:\/\/forums.aws.amazon.com\/profile.jspa?userID=293234","name":"hardeepb","username":"hardeepb"},"boardname":"AWS Developer Forums: Discussion Forums","categories":"Software","content":"<div style=\"line-height:1.5; padding-left: 25px;padding-right: 10px;\">\n                Hey,<br \/>\n<br \/>\nSince you talked about IP tables, one of the way you can limit the connection is by using 'hitcount' option in IP Tables.<br \/>\nQuick search provide couple of useful link to being.<br \/>\n<a class=\"jive-link-external\" href=\"http:\/\/sysextra.blogspot.com\/2010\/11\/using-mighty-iptables-to-prevent-https.html\">http:\/\/sysextra.blogspot.com\/2010\/11\/using-mighty-iptables-to-prevent-https.html<\/a><br \/>\n<a class=\"jive-link-external\" href=\"http:\/\/grokbase.com\/t\/centos\/centos\/126b2fb8j7\/iptables-hitcount\">http:\/\/grokbase.com\/t\/centos\/centos\/126b2fb8j7\/iptables-hitcount<\/a><br \/>\n<br \/>\nOR<br \/>\n<br \/>\nYou
  can search in marketplace for AMIs, however this might require topology change, for example check links below.<br \/>\n<a class=\"jive-link-external\" href=\"https:\/\/aws.amazon.com\/marketplace\/pp\/B007OOKAZ0?sr=0-5\">https:\/\/aws.amazon.com\/marketplace\/pp\/B007OOKAZ0?sr=0-5<\/a><br \/>\n<a class=\"jive-link-external\" href=\"https:\/\/aws.amazon.com\/marketplace\/pp\/B00FGCUM7S\/ref=vdr_rf\">https:\/\/aws.amazon.com\/marketplace\/pp\/B00FGCUM7S\/ref=vdr_rf<\/a><br \/>\n<br \/>\nThanks\n                <\/div>","contenttype":"html","countrycode":"US","crawled":"Sat, 29 Mar 2014 10:48:38 +0000","created_at":"Wed, 26 Mar 2014 04:38:00 +0000","domain":"aws.amazon.com","forumid":"4fb3198a32","forumname":"Category: Amazon Web Services Amazon Elastic Compute Cloud","forumurl":"https:\/\/forums.aws.amazon.com\/forum.jspa?forumID=30","id":"1e3b4a068f68a400e072b065ee85dcba","language":"English","link":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=148679&tstart=100#532280","li
 nks":["http:\/\/sysextra.blogspot.com\/2010\/11\/using-mighty-iptables-to-prevent-https.html","http:\/\/grokbase.com\/t\/centos\/centos\/126b2fb8j7\/iptables-hitcount","https:\/\/aws.amazon.com\/marketplace\/pp\/B007OOKAZ0?sr=0-5","https:\/\/aws.amazon.com\/marketplace\/pp\/B00FGCUM7S\/ref=vdr_rf"],"siteid":"4fb31966d4","thread":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=148679&tstart=100","threadid":"148679","title":"Apache is under DOS attack","topics":"Computers","type":"post"},"interaction":{"author":{"link":"https:\/\/forums.aws.amazon.com\/profile.jspa?userID=293234","name":"hardeepb","username":"hardeepb"},"content":"<div style=\"line-height:1.5; padding-left: 25px;padding-right: 10px;\">\n                Hey,<br \/>\n<br \/>\nSince you talked about IP tables, one of the way you can limit the connection is by using 'hitcount' option in IP Tables.<br \/>\nQuick search provide couple of useful link to being.<br \/>\n<a class=\"jive-link-external\" href=\"http:\/\/sy
 sextra.blogspot.com\/2010\/11\/using-mighty-iptables-to-prevent-https.html\">http:\/\/sysextra.blogspot.com\/2010\/11\/using-mighty-iptables-to-prevent-https.html<\/a><br \/>\n<a class=\"jive-link-external\" href=\"http:\/\/grokbase.com\/t\/centos\/centos\/126b2fb8j7\/iptables-hitcount\">http:\/\/grokbase.com\/t\/centos\/centos\/126b2fb8j7\/iptables-hitcount<\/a><br \/>\n<br \/>\nOR<br \/>\n<br \/>\nYou can search in marketplace for AMIs, however this might require topology change, for example check links below.<br \/>\n<a class=\"jive-link-external\" href=\"https:\/\/aws.amazon.com\/marketplace\/pp\/B007OOKAZ0?sr=0-5\">https:\/\/aws.amazon.com\/marketplace\/pp\/B007OOKAZ0?sr=0-5<\/a><br \/>\n<a class=\"jive-link-external\" href=\"https:\/\/aws.amazon.com\/marketplace\/pp\/B00FGCUM7S\/ref=vdr_rf\">https:\/\/aws.amazon.com\/marketplace\/pp\/B00FGCUM7S\/ref=vdr_rf<\/a><br \/>\n<br \/>\nThanks\n                <\/div>","contenttype":"html","created_at":"Wed, 26 Mar 2014 04:38:00 +0000"
 ,"id":"1e3b4a068f68a400e072b065ee85dcba","link":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=148679&tstart=100#532280","received_at":4743642502085381141,"schema":{"version":3},"subtype":"post","title":"Apache is under DOS attack","type":"amazon"},"language":{"confidence":99,"tag":"en","tag_extended":"en"},"links":{"code":[200,200,200,200],"created_at":["Sat, 29 Mar 2014 15:17:47 +0000","Sat, 29 Mar 2014 15:17:47 +0000","Sat, 29 Mar 2014 15:17:48 +0000","Sat, 29 Mar 2014 15:17:48 +0000"],"hops":[["http:\/\/sysextra.blogspot.com\/2010\/11\/using-mighty-iptables-to-prevent-https.html"],[],[],[]],"meta":{"charset":["UTF-8","UTF-8","UTF-8","UTF-8"],"content_type":["text\/html","text\/html","text\/html","text\/html"],"description":["","(1 reply) Hello, up to CentOS 5.3 it was possible, to control new ip connections by \"recent\", \"seconds\" and \"hitcount\" -A INPUT -m state --state NEW -m recent --set -p tcp --dport 80 -A INPUT -m state --state NEW -m recent --update --seconds
  60 --hitcount 1000 -p tcp --dport 80 -j LOG --log-prefix \"FW DROP IP Flood: \" -A INPUT -p tcp -m tcp --dport 80 -m state --state NEW -m recent --update --seconds 60 --hitcount 1000 -j DROP -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT so that -","aiProtect identifies and mitigates DDoS attacks, while tracking the source and method of the attack. aiProtect works like a reverse proxy server and is placed in between your origin server and the web.","Complementing traditional network security solutions, DenyAll's Protect family of Web Application Firewalls (WAF) and Web Services Firewalls (WSF) rely on a HTTP\/HTTPS reverse proxy architecture and provide"],"keywords":[[],[],["aiProtect Denial of Service Protection","Security","Network Infrastructure","DOS DDOS Firewall SYN flood Free Trial","Monitoring","Server Software","AWS","EC2"],["DenyAll Protect - Web Application & Service Firewalls","Security","Network Infrastructure","security waf reverse proxy","Monitoring
 ","Server Software","AWS","EC2"]],"lang":["unknown","unknown","unknown","unknown"]},"normalized_url":["http:\/\/sysextra.blogspot.co.uk\/2010\/11\/using-mighty-iptables-to-prevent-https.html","http:\/\/grokbase.com\/t\/centos\/centos\/126b2fb8j7\/iptables-hitcount","https:\/\/aws.amazon.com\/marketplace\/pp\/B007OOKAZ0?sr=0-5","https:\/\/aws.amazon.com\/marketplace\/pp\/B00FGCUM7S\/ref=vdr_rf"],"retweet_count":[0,0,0,0],"title":["The Sysadmin Extravaganza: Using the Mighty IPTables to Prevent an HTTP(s) DoS Attack","[CentOS] iptables: hitcount - Grokbase","aiProtect Denial of Service Protection on AWS Marketplace","DenyAll Protect - Web Application & Service Firewalls on AWS Marketplace"],"url":["http:\/\/sysextra.blogspot.co.uk\/2010\/11\/using-mighty-iptables-to-prevent-https.html","http:\/\/grokbase.com\/t\/centos\/centos\/126b2fb8j7\/iptables-hitcount","https:\/\/aws.amazon.com\/marketplace\/pp\/B007OOKAZ0?sr=0-5","https:\/\/aws.amazon.com\/marketplace\/pp\/B00FGCUM7S\/ref=vdr_r
 f"]},"salience":{"content":{"sentiment":2},"title":{"entities":[{"name":"Apache","sentiment":-6,"confident":1,"label":"Company","evidence":7,"type":"Company","about":1}],"sentiment":-6,"topics":[{"name":"War","score":0.53363662958145,"additional":"Apache is under DOS attack","hits":0}]}}}
+{"amazon":{"anchor":"532553","author":{"link":"https:\/\/forums.aws.amazon.com\/profile.jspa?userID=157781","name":"ashokkumarkashnia","username":"ashokkumarkashnia"},"boardname":"AWS Developer Forums: Discussion Forums","categories":"Software","content":"<div style=\"line-height:1.5; padding-left: 25px;padding-right: 10px;\">\n                Team,<br \/>\n<br \/>\nWe are using auto scaling with multiple sever, Please let us know how can we manage apache logs in centralized. <br \/>\n<br \/>\nI want to use s3 bucket for it.<br \/>\n<br \/>\nPlease help<br \/>\n<br \/>\nThanks\n                <\/div>","contenttype":"html","countrycode":"US","crawled":"Sat, 29 Mar 2014 10:35:16 +0000","created_at":"Thu, 27 Mar 2014 03:54:00 +0000","domain":"aws.amazon.com","forumid":"4fb3198a32","forumname":"Category: Amazon Web Services Amazon Elastic Compute Cloud","forumurl":"https:\/\/forums.aws.amazon.com\/forum.jspa?forumID=30","id":"1e3b5636dd03ac00e0720ed85ed96cc0","language":"English","link
 ":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=148890&tstart=75#532553","siteid":"4fb31966d4","thread":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=148890&tstart=75","threadid":"148890","threadstarter":1,"title":"Centerlized apache logs manage","topics":"Computers","type":"thread"},"interaction":{"author":{"link":"https:\/\/forums.aws.amazon.com\/profile.jspa?userID=157781","name":"ashokkumarkashnia","username":"ashokkumarkashnia"},"content":"<div style=\"line-height:1.5; padding-left: 25px;padding-right: 10px;\">\n                Team,<br \/>\n<br \/>\nWe are using auto scaling with multiple sever, Please let us know how can we manage apache logs in centralized. <br \/>\n<br \/>\nI want to use s3 bucket for it.<br \/>\n<br \/>\nPlease help<br \/>\n<br \/>\nThanks\n                <\/div>","contenttype":"html","created_at":"Thu, 27 Mar 2014 03:54:00 +0000","id":"1e3b5636dd03ac00e0720ed85ed96cc0","link":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=148890
 &tstart=75#532553","received_at":4743642503378266122,"schema":{"version":3},"subtype":"thread","title":"Centerlized apache logs manage","type":"amazon"},"language":{"confidence":99,"tag":"en","tag_extended":"en"},"salience":{"content":{"sentiment":0},"title":{"sentiment":0}}}
+{"amazon":{"anchor":"532637","author":{"link":"https:\/\/forums.aws.amazon.com\/profile.jspa?userID=151961","name":"soundstrue-phil","username":"soundstrue-phil"},"boardname":"AWS Developer Forums: Discussion Forums","categories":"Software","content":"<div style=\"line-height:1.5; padding-left: 25px;padding-right: 10px;\">\n                Greetings to all! I am curious if anyone is currently running their elastic beanstalk environment behind an apache reverse proxy? Currently we have been doing our proxy config as follows (directly specify a host or if needed we setup a balancer\/cluster)<br \/>\n<br \/>\n<a class=\"jive-link-external\" href=\"http:\/\/example.com\/shop\/\">http:\/\/example.com\/shop\/<\/a><br \/>\n  ProxyPass \/shop <a class=\"jive-link-external\" href=\"http:\/\/app01.example-util.com\">http:\/\/app01.example-util.com<\/a><br \/>\n<br \/>\n<a class=\"jive-link-external\" href=\"http:\/\/example.com\/blog\/\">http:\/\/example.com\/blog\/<\/a><br \/>\n  ProxyPass \
 /blog <a class=\"jive-link-external\" href=\"http:\/\/app02.example-util.com\">http:\/\/app02.example-util.com<\/a><br \/>\n<br \/>\n<a class=\"jive-link-external\" href=\"http:\/\/example.com\/store\/\">http:\/\/example.com\/store\/<\/a><br \/>\n   ProxyPass \/store  storeapp-env.elasticbeanstalk.com<br \/>\n<br \/>\nHowever, I end up getting a 502 error and I am guessing it is because instead of specifying a single apache host I am entering the public dns name of the elastic beanstalk load balancer. I am talking with Amazon support but it would seem that I probably need to set this up using a less automated and more complicated configuration (perhaps elasticbeanstalk will not work this way -- or perhaps I need to set it up inside of a VPC). <br \/>\n<br \/>\nI imagine I am not the only one doing this so any assistance would be helpful. Thanks!\n                <\/div>","contenttype":"html","countrycode":"US","crawled":"Thu, 27 Mar 2014 13:54:12 +0000","created_at":"Thu, 27 Mar 201
 4 10:10:00 +0000","domain":"aws.amazon.com","forumid":"4fb3198a5d","forumname":"AWS Elastic Beanstalk (Beta)","forumurl":"https:\/\/forums.aws.amazon.com\/forum.jspa?forumID=86","id":"1e3b597f49f0ac00e072700816848226","language":"English","link":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=148928&tstart=0#532637","links":["http:\/\/example.com\/shop\/","http:\/\/app01.example-util.com","http:\/\/example.com\/blog\/","http:\/\/app02.example-util.com","http:\/\/example.com\/store\/"],"siteid":"4fb31966d4","thread":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=148928&tstart=0","threadid":"148928","threadstarter":1,"title":"Running an Elastic Beanstalk container behind an Apache Reverse Proxy?","topics":"Computers","type":"thread"},"demographic":{"gender":"male"},"interaction":{"author":{"link":"https:\/\/forums.aws.amazon.com\/profile.jspa?userID=151961","name":"soundstrue-phil","username":"soundstrue-phil"},"content":"<div style=\"line-height:1.5; padding-left: 25px
 ;padding-right: 10px;\">\n                Greetings to all! I am curious if anyone is currently running their elastic beanstalk environment behind an apache reverse proxy? Currently we have been doing our proxy config as follows (directly specify a host or if needed we setup a balancer\/cluster)<br \/>\n<br \/>\n<a class=\"jive-link-external\" href=\"http:\/\/example.com\/shop\/\">http:\/\/example.com\/shop\/<\/a><br \/>\n  ProxyPass \/shop <a class=\"jive-link-external\" href=\"http:\/\/app01.example-util.com\">http:\/\/app01.example-util.com<\/a><br \/>\n<br \/>\n<a class=\"jive-link-external\" href=\"http:\/\/example.com\/blog\/\">http:\/\/example.com\/blog\/<\/a><br \/>\n  ProxyPass \/blog <a class=\"jive-link-external\" href=\"http:\/\/app02.example-util.com\">http:\/\/app02.example-util.com<\/a><br \/>\n<br \/>\n<a class=\"jive-link-external\" href=\"http:\/\/example.com\/store\/\">http:\/\/example.com\/store\/<\/a><br \/>\n   ProxyPass \/store  storeapp-env.elasticbeanstalk.c
 om<br \/>\n<br \/>\nHowever, I end up getting a 502 error and I am guessing it is because instead of specifying a single apache host I am entering the public dns name of the elastic beanstalk load balancer. I am talking with Amazon support but it would seem that I probably need to set this up using a less automated and more complicated configuration (perhaps elasticbeanstalk will not work this way -- or perhaps I need to set it up inside of a VPC). <br \/>\n<br \/>\nI imagine I am not the only one doing this so any assistance would be helpful. Thanks!\n                <\/div>","contenttype":"html","created_at":"Thu, 27 Mar 2014 10:10:00 +0000","id":"1e3b597f49f0ac00e072700816848226","link":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=148928&tstart=0#532637","received_at":4743641818705321945,"schema":{"version":3},"subtype":"thread","title":"Running an Elastic Beanstalk container behind an Apache Reverse Proxy?","type":"amazon"},"language":{"confidence":99,"tag":"en","tag_e
 xtended":"en"},"links":{"code":[404,500,404,500,404],"created_at":["Thu, 27 Mar 2014 18:02:20 +0000","Thu, 27 Mar 2014 18:02:20 +0000","Thu, 27 Mar 2014 18:02:20 +0000","Thu, 27 Mar 2014 18:02:20 +0000","Thu, 27 Mar 2014 18:02:20 +0000"],"hops":[["http:\/\/example.com\/shop\/"],["http:\/\/app01.example-util.com"],["http:\/\/example.com\/blog\/"],["http:\/\/app02.example-util.com"],["http:\/\/example.com\/store\/"]],"normalized_url":[null,null,null,null,null],"retweet_count":[0,0,0,0,0],"title":["null","null","null","null","null"],"url":["http:\/\/example.com\/shop\/","http:\/\/app01.example-util.com","http:\/\/example.com\/blog\/","http:\/\/app02.example-util.com","http:\/\/example.com\/store\/"]},"salience":{"content":{"entities":[{"name":"Amazon.com","sentiment":-1,"confident":1,"label":"Company","evidence":5,"type":"Company","about":1,"themes":["elastic beanstalk load balancer","single apache host","dns name","complicated configuration","perhaps elasticbeanstalk"]},{"name":"VPC",
 "sentiment":-1,"confident":1,"label":"Company","evidence":5,"type":"Company","about":1,"themes":["elastic beanstalk load balancer","single apache host","dns name","complicated configuration","perhaps elasticbeanstalk"]}],"sentiment":0},"title":{"sentiment":0}}}
+{"amazon":{"anchor":"533193","author":{"link":"https:\/\/forums.aws.amazon.com\/profile.jspa?userID=293511","name":"zwowski","username":"zwowski"},"boardname":"AWS Developer Forums: Discussion Forums","categories":"Software","content":"<div style=\"line-height:1.5; padding-left: 25px;padding-right: 10px;\">\n                Hi there,<br \/>\n<br \/>\nI have some troubles applying the Apache SSLRequireSSL directive..<br \/>\nI'm running a single instance PHP 5.5 environment.<br \/>\n<br \/>\nI have set up SSL as described here: <a class=\"jive-link-external\" href=\"http:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/SSL.SingleInstance.html\">http:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/SSL.SingleInstance.html<\/a><br \/>\n<br \/>\nI used the ssl.conf snippet as given for PHP:<a class=\"jive-link-external\" href=\"http:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/SSLPHP.SingleInstance.html\">http:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/
 SSLPHP.SingleInstance.html<\/a><br \/>\n<br \/>\n(Btw: is this mere a (simple) example? Perhaps this could be improved upon? (e.g. I miss some directives like SSLCipherSuite and SSLSessionCache?))<br \/>\n<br \/>\nI want to protect my app\/environment with HTTP authentication, and want to force all traffic over HTTPS, <b>including<\/b> the HTTP authentication.<br \/>\n<br \/>\nA redirect won't work, as people will still be asked their credentials over HTTP, thus their login info will be sent in the clear the first time in that case... (as a redirect will kick in afterwards.)<br \/>\n<br \/>\nThe solution seems to be to use SSLRequireSSL, and, if you want to auto-redirect HTTP, catch the 403 Forbidden generated.<br \/>\n(SSLRequireSSL takes precedence over Auth.)<br \/>\n<br \/>\nThe problem is, opposed to what to expect; I also get a 403 Forbidden on the <a class=\"jive-link-external\" href=\"https:\/\/\">https:\/\/<\/a> domain.<br \/>\n<br \/>\nI guess it has to do with the proxy s
 etup?:<br \/>\n<pre class=\"jive-pre\"><code class=\"jive-code jive-java\">ProxyPass \/ http:<font color=\"darkgreen\">\/\/localhost:80\/ retry=0<\/font>\nProxyPassReverse \/ http:<font color=\"darkgreen\">\/\/localhost:80\/<\/font>\nProxyPreserveHost on\n<\/code><\/pre><br \/>\nIs there anyway I can get this to work?<br \/>\n<br \/>\nThanks!<br \/>\n<br \/>\nps: I tried both the 2013.09 AMI, and the 2014.02 AMI, where the latter, as stated here: <a class=\"jive-link-external\" href=\"http:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/concepts.platforms.html#concepts.platforms.PHP\">http:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/concepts.platforms.html#concepts.platforms.PHP<\/a> should have Apache 2.2 installed\/configured?<br \/>\nThis is <b>not<\/b> the case however; I found the same Apache version installed as on the 2013.09 AMI (2.4.6 that is)?<br \/>\n<br \/>\n\n                <\/div>","contenttype":"html","countrycode":"US","crawled":"Tue, 01 Apr 2014 0
 2:56:53 +0000","created_at":"Sun, 30 Mar 2014 02:56:00 +0000","domain":"aws.amazon.com","forumid":"4fb3198a5d","forumname":"AWS Elastic Beanstalk (Beta)","forumurl":"https:\/\/forums.aws.amazon.com\/forum.jspa?forumID=86","id":"1e3b7b6d2cfaa000e072b2fe78019acc","language":"English","link":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=149131&tstart=0#533193","links":["http:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/SSL.SingleInstance.html","http:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/SSLPHP.SingleInstance.html","http:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/concepts.platforms.html#concepts.platforms.PHP"],"siteid":"4fb31966d4","thread":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=149131&tstart=0","threadid":"149131","threadstarter":1,"title":"Apache: SSLRequireSSL (single instance)","topics":"Computers","type":"thread"},"interaction":{"author":{"link":"https:\/\/forums.aws.amazon.com\/profile.jspa?userID=293511","name":"zwo
 wski","username":"zwowski"},"content":"<div style=\"line-height:1.5; padding-left: 25px;padding-right: 10px;\">\n                Hi there,<br \/>\n<br \/>\nI have some troubles applying the Apache SSLRequireSSL directive..<br \/>\nI'm running a single instance PHP 5.5 environment.<br \/>\n<br \/>\nI have set up SSL as described here: <a class=\"jive-link-external\" href=\"http:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/SSL.SingleInstance.html\">http:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/SSL.SingleInstance.html<\/a><br \/>\n<br \/>\nI used the ssl.conf snippet as given for PHP:<a class=\"jive-link-external\" href=\"http:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/SSLPHP.SingleInstance.html\">http:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/SSLPHP.SingleInstance.html<\/a><br \/>\n<br \/>\n(Btw: is this mere a (simple) example? Perhaps this could be improved upon? (e.g. I miss some directives like SSLCipherSuite and SSLSessionCache?))<
 br \/>\n<br \/>\nI want to protect my app\/environment with HTTP authentication, and want to force all traffic over HTTPS, <b>including<\/b> the HTTP authentication.<br \/>\n<br \/>\nA redirect won't work, as people will still be asked their credentials over HTTP, thus their login info will be sent in the clear the first time in that case... (as a redirect will kick in afterwards.)<br \/>\n<br \/>\nThe solution seems to be to use SSLRequireSSL, and, if you want to auto-redirect HTTP, catch the 403 Forbidden generated.<br \/>\n(SSLRequireSSL takes precedence over Auth.)<br \/>\n<br \/>\nThe problem is, opposed to what to expect; I also get a 403 Forbidden on the <a class=\"jive-link-external\" href=\"https:\/\/\">https:\/\/<\/a> domain.<br \/>\n<br \/>\nI guess it has to do with the proxy setup?:<br \/>\n<pre class=\"jive-pre\"><code class=\"jive-code jive-java\">ProxyPass \/ http:<font color=\"darkgreen\">\/\/localhost:80\/ retry=0<\/font>\nProxyPassReverse \/ http:<font color=\"dar
 kgreen\">\/\/localhost:80\/<\/font>\nProxyPreserveHost on\n<\/code><\/pre><br \/>\nIs there anyway I can get this to work?<br \/>\n<br \/>\nThanks!<br \/>\n<br \/>\nps: I tried both the 2013.09 AMI, and the 2014.02 AMI, where the latter, as stated here: <a class=\"jive-link-external\" href=\"http:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/concepts.platforms.html#concepts.platforms.PHP\">http:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/concepts.platforms.html#concepts.platforms.PHP<\/a> should have Apache 2.2 installed\/configured?<br \/>\nThis is <b>not<\/b> the case however; I found the same Apache version installed as on the 2013.09 AMI (2.4.6 that is)?<br \/>\n<br \/>\n\n                <\/div>","contenttype":"html","created_at":"Sun, 30 Mar 2014 02:56:00 +0000","id":"1e3b7b6d2cfaa000e072b2fe78019acc","link":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=149131&tstart=0#533193","schema":{"version":3},"subtype":"thread","title":"Apache: SSLRequireSSL
  (single instance)","type":"amazon"},"language":{"confidence":99,"tag":"en","tag_extended":"en"},"links":{"code":[200,200,200],"created_at":["Tue, 01 Apr 2014 07:44:11 +0000","Tue, 01 Apr 2014 07:44:11 +0000","Tue, 01 Apr 2014 07:44:12 +0000"],"hops":[[],[],["http:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/concepts.platforms.html#concepts.platforms.PHP"]],"meta":{"charset":["CP1252","CP1252","CP1252"],"content_type":["text\/html","text\/html","text\/html"],"description":["Configure SSL for single-instance environments that have applications running on Apache Tomcat, Python, Node.js, or PHP 5.3 and PHP 5.4.","Configure SSL for single-instance environments that have applications running on PHP 5.3, PHP 5.4, and PHP 5.5.","AWS Elastic Beanstalk supports applications developed in Java, PHP, .NET, Node.js, Python, and Ruby, each with their own container types. Container types can be described according to the container name (also known as the solution stack name or predefined
  configuration), the AMI (or operating system), programming language, Web Server, and Reverse Proxy."],"lang":["unknown","unknown","unknown"]},"normalized_url":["http:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/SSL.SingleInstance.html","http:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/SSLPHP.SingleInstance.html","http:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/concepts.platforms.html"],"retweet_count":[0,0,0],"title":["Configuring SSL for Single-Instance Environments - AWS Elastic Beanstalk","SSL on Single-Instances of PHP 5.3, PHP 5.4, and PHP 5.5 - AWS Elastic Beanstalk","Supported Platforms - AWS Elastic Beanstalk"],"url":["http:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/SSL.SingleInstance.html","http:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/SSLPHP.SingleInstance.html","http:\/\/docs.aws.amazon.com\/elasticbeanstalk\/latest\/dg\/concepts.platforms.html"]},"salience":{"content":{"entities":[{"name":"Apache","sentiment":0,
 "confident":1,"label":"Company","evidence":1,"type":"Company","about":0}],"sentiment":-2},"title":{"entities":[{"name":"Apache","sentiment":0,"confident":1,"label":"Company","evidence":4,"type":"Company","about":1,"themes":["single instance"]}],"sentiment":0}}}
+{"amazon":{"anchor":"533271","author":{"link":"https:\/\/forums.aws.amazon.com\/profile.jspa?userID=293511","name":"zwowski","username":"zwowski"},"boardname":"AWS Developer Forums: Discussion Forums","categories":"Software","content":"Well, got a solution for what I wanted to accomplish, and it can all be done in a .htaccess:\n\nAuthUserFile ...\n...\nRequire valid-user\n \nOrder deny,allow\nDeny from all\nAllow from 127.0.0.1\n\n\nPerhaps I could've realized sooner something like this would work, but this stuff is not my prime field of expertise\nI figure this only grants the SSL proxy access to the default port 80 HTTP domain.\n\nI do keep this question open, since I'm still wondering about the SSLRequireSSL directive.","contenttype":"html","countrycode":"US","crawled":"Tue, 01 Apr 2014 02:56:53 +0000","created_at":"Sun, 30 Mar 2014 15:11:00 +0000","domain":"aws.amazon.com","forumid":"4fb3198a5d","forumname":"AWS Elastic Beanstalk (Beta)","forumurl":"https:\/\/forums.aws.amazon.c
 om\/forum.jspa?forumID=86","id":"1e3b81d80759aa00e072ad336a2bab92","language":"English","link":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=149131&tstart=0#533271","siteid":"4fb31966d4","thread":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=149131&tstart=0","threadid":"149131","title":"Apache: SSLRequireSSL (single instance)","topics":"Computers","type":"post"},"interaction":{"author":{"link":"https:\/\/forums.aws.amazon.com\/profile.jspa?userID=293511","name":"zwowski","username":"zwowski"},"content":"Well, got a solution for what I wanted to accomplish, and it can all be done in a .htaccess:\n\nAuthUserFile ...\n...\nRequire valid-user\n \nOrder deny,allow\nDeny from all\nAllow from 127.0.0.1\n\n\nPerhaps I could've realized sooner something like this would work, but this stuff is not my prime field of expertise\nI figure this only grants the SSL proxy access to the default port 80 HTTP domain.\n\nI do keep this question open, since I'm still wondering about the
  SSLRequireSSL directive.","contenttype":"html","created_at":"Sun, 30 Mar 2014 15:11:00 +0000","id":"1e3b81d80759aa00e072ad336a2bab92","link":"https:\/\/forums.aws.amazon.com\/thread.jspa?threadID=149131&tstart=0#533271","schema":{"version":3},"subtype":"post","title":"Apache: SSLRequireSSL (single instance)","type":"amazon"},"language":{"confidence":99,"tag":"en","tag_extended":"en"},"salience":{"content":{"sentiment":1},"title":{"entities":[{"name":"Apache","sentiment":0,"confident":1,"label":"Company","evidence":4,"type":"Company","about":1,"themes":["single instance"]}],"sentiment":0}}}