spot7.org logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
  Home » APACHE » Page 1
How to create Apache service with custom httpd.conf file
I suggest you to list down your customization in one of the file say my.conf. And as described on the Apache Site If you need to have specifically named configuration files for different services, you must use this: httpd.exe -k install -n "MyServiceName" -f "c:filesmy.conf" Good Luck!

Categories : Apache

Problems using .htaccess to make some pages secure and some unsecure
%{REQUEST_URI} is a variable that always starts with a /. Due to this, the second condition of the second rule will always be true, as %{REQUEST_URI} will never be equal to ^renew$. To fix this, change that condition to: RewriteCond %{REQUEST_URI} !^/renew$

Categories : Apache

Can you cascade sliding time windows in sparks streaming
Batch interval Window length and sliding interval must be a multiply of the batch interval. To avoid race conditions (for example emitting three 5 second sums in a 10 seconds window) the batch interval must be greater than the calculation time. I'll assume a batch interval of 1000ms here. Example JavaPairDStream<String, Double> stream = input; // A: 5s sum every 5s stream5sCount = strea

Categories : Apache

What is the difference between double and single quotes in pig?
Pig doesn't support double quotes for string literals(ie chararray). All the chararray must be enclosed within single quotes. A String or Chararrays are represented in interfaces by java.lang.String. Constant chararrays are expressed as string literals with single quotes, for example, 'fred' Reference:http://chimera.labs.oreilly.com/books/1234000001811/ch04.html#scalar_types

Categories : Apache

Hive failed to show tables in warehouse
Reason you might not have used Location when creation your create table command. You should use it like: CREATE TABLE mytable .... .... LOCATION 'hdfs://user/hive/warehouse'

Categories : Apache

Reverse proxy: unwanted URL change
Try and edit the config to: <VirtualHost *:80> <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPreserveHost On ProxyRequests Off ProxyPass /bar http://foo.com:8080 # Note removed /bar ProxyPassReverse /bar foo.com:8080 # Note removed /bar DocumentRoot /var/www/foo/ ServerName info.foo.com <Directory /var

Categories : Apache

Storm - KeeperException
Let me ask some questions regarding your topology: 1. How are you ensuring that spout executor runs only on first supervisor node? It can run on any supervisor node. 2. Supervisor node registered correctly in the cluster? I mean this node shows on UI? Because as per the exception, it seems zookeeper does not aware of this node. 3. If spout runs on first supervisor node means that kafka config para

Categories : Apache

Accessing Spark SQL RDD tables through the Thrift Server
From SPARK-3675: A common question on the mailing list is how to read from temporary tables over JDBC. While we should try and support most of this in SQL, it would also be nice to query generic RDDs over JDBC. And the solution (coming in Spark 1.2.0) is indeed to use HiveThriftServer2.startWithContext.

Categories : Apache

SOLR SurroundQueryParser can it come with NOT
Use the NOT operator. {!surround}SomeField:30w(Text1*,Text2*) NOT(SomeField:Text3) See also: Solr's SurroundQueryParser documentation

Categories : Apache

How to test a moving server
Entries in /etc/hosts usually take precedence over DNS resolution, so you can talk to the new server on its new IP with the name www.mydomain.com without having a DNS entry for that, so you don't have to mess with the configuration you copy from the old server. The line would look something like 10.66.66.66 www.mydomain.com if 10.66.66.66 is the IP of the new server. If your server does funny

Categories : Apache

Error Nutch No agents listed in 'http.agent.name'
You shoule add the property of "http.robots.agents" and put the value of http.agent.name as the first agent name, and keep the default * at the end of the list.just like: <property> <name>http.robots.agents</name> <value>nutch-spider-2.2.1,*</value> </property>

Categories : Apache

Redirections with .htaccess
If you want to literally only capture the case you've described, do this: RewriteCond %{HTTP_HOST} ^XXXXXX.es$ RewriteRule campusvirtual/moodle/login/index.php http://YYYYYY.es/campusvirtual/login.php [L,R=301] If you want to capture what's after /moodle/ and before index.php for every request: RewriteCond %{HTTP_HOST} ^XXXXXX.es$ RewriteRule campusvirtual/moodle/(.*)/index.php http://YYYYYY.e

Categories : Apache

log4j2 how to disable "date:" lookup - log4j throws exception
To disable the date lookup locally, you can add a "$" in front of the expression: log.info("$${date:now:buhu}"); This will print ${date:now:buhu} instead of throwing an exception printing the stack trace. As for how to avoid this using Camel, I'm not sure. The cleanest fix would probably be a log4j2 update to disable their DateLookup feature. A temporary fix is to disable DEBUG level logs

Categories : Apache

301 redirect for all get request
RedirectMatch does match anything behind the domain name and before the query string. The regex /?(.*)$ will match any request. You will need to use mod_rewrite. Enable mod_rewrite in the main config file of Apache and restart Apache. Then add the following to your .htaccess file: RewriteEngine on RewriteCond %{QUERY_STRING} .+ RewriteRule ^ - [QSD,R,L] Change the [R] flag to [R=301] after tes

Categories : Apache

Apache camel bindy
@Link can help to encapsulate two related fiends on a separate class. So, for example for the CSV Order,Name,Surname 1,Frank,Smith You could do something like this public class Order { @DataField(pos = 1) private int orderNr; @Link private Client client; } @Link public class Client { @DataField(pos = 2) private String firstname; @DataField(pos = 3) private String lastname; } For a full ex

Categories : Apache

Spark how to execute one map action on only one work node?
No easy way of doing it in Spark. And more important, there's no meaning in doing this evaluation in Spark. The thing you need it something like distributed orchestration. You have following choices: Use Spark for this. You can start it on Yarn and specify maximum amount of memory available to Yarn on each of the nodes, it will prevent it from scheduling more than one execution container per nod

Categories : Apache

.htaccess: How to remove subfolder's subfolder in URL?
You can try this code: RewriteEngine on RewriteBase /~username/ RewriteCond %{THE_REQUEST} ^GET /public/ [NC] RewriteRule ^public/(.*)$ $1 [L,R=301,NE] RewriteRule ^((?!public/).*)$ public/$1 [L,NC]

Categories : Apache

apache AllowOverride /var/www/html but not /var/www/html/temp/
There's not really a trick here, if you create a 2nd directory section that is conceptually below the first, its changes will be merged in: <Directory "/var/www/html/temp"> AllowOverride None </Directory> For clarity, just put it immediately after the existing Directory section, although for Directory that is not strictly necessary. You should review the basics of the "configurat

Categories : Apache

How to transfer the data from windows7 machine to windows 2003 server using ANT script or batch script?
Most systems have an admin share defined. Your C: drive is located at \locahostC$. Replace localhost with the name of your target system. You should run net use n: \servernamec$ to establish a connection. If you are not in a domain, you will need to specify username and a password for the connection. Once you map it, you can treat it like a local drive in your scripts in most situations. Then u

Categories : Apache

Apache Pig Remove group element from bag
If you want to sum the value based on each key then use the below approach input.txt key1,10 key2,5 key2,15 Pigscript: A = LOAD 'inpput.txt' USING PigStorage(',') AS(key:chararray,value:int); B = GROUP A BY key; C = FOREACH B GENERATE group,SUM(A.value); DUMP C; Output: (key1,10) (key2,20) If you want to keep only the values inside the bag then replace the above 'C' with this one. C =

Categories : Apache

mod_rewrite does not rewrite, error.log shows no valuable information
Your real bug is using <Directory /> rather than a direcotry section for /var/www. Your rewrite would match in that context and you wouldn't be opening up your entire filesystem. When you use RewriteRule in Directory/Location/htaccess, the comparisons are relative to where you define them. That's what it's trying to guess at stripping. If you simplify and move rewrite outside of Directory

Categories : Apache

Run script during HTTP request
It seems to me that what you are trying to do is essentially have servers load files from one primary server. I would recommend not running a script but using the CDN servers as proxies which cache the responses. You would have to setup something like this in your apache (virtual)host directive. ProxyRequests off ProxyPass / http://backend.example.com/ ProxyPassReverse / http://backend.example.c

Categories : Apache

Redirect subdomain to another subdomain same structure subfolder
try this: this code write in .htaccess file and put on the root folder of old domain (your domain1) <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.olddomain.com$ RewriteRule (.*)$ http://www.newdomain.com/$1 [R=301,L] </IfModule>

Categories : Apache

Removing duplicate headers from HTTP requests
You can use mod_headers to remove the duplicate header. See their official docs for information on how to enable it. Then you can add a line like this to your configuration file so that the first part of header disappears: RequestHeader edit Authorization "^BASIC abc123\, " "" Let me know if that works for you.

Categories : Apache

How to print the description of file in colored font in apache2?
You can do this by adding HTML message with the apache AddDescription directive. Quote from the apache documentation: Descriptive text defined with AddDescription may contain HTML markup, such as tags and character entities. If the width of the description column should happen to truncate a tagged element (such as cutting off the end of a bolded phrase), the results may affect the rest o

Categories : Apache

Camel - data from two sources
Something must trigger the process - either the file or the database so pick one. Then you can use the enricher pattern to populate the other source (when data is ready). An aggregation strategy is used to combine the data. You typically write the aggregation strategy in java. The link has examples how to enrich and merge data. You can find out how to handle database and files in the Camel docum

Categories : Apache

Tomcat behind Apache using ajp for Spring Boot application
Deduced from the comments above: @Configuration public class TomcatAjpConfig { @Bean @SuppressWarnings("static-method") public EmbeddedServletContainerFactory servletContainer() { TomcatEmbeddedServletContainerFactory tomcat = new TomcatEmbeddedServletContainerFactory(); tomcat.addAdditionalTomcatConnectors(createConnector()); tomcat.addContextValves(createRemoteIpValves()); retu

Categories : Apache

Spark Streaming: Could not compute split, block not found
have you tried with inputs.persist(StorageLevel.MEMORY_AND_DISK_SER). E.g. http://apache-spark-user-list.1001560.n3.nabble.com/Spark-Streaming-Could-not-compute-split-block-not-found-td11186.html

Categories : Apache

Download a file using Camel based on a url in an SQS message
How about use splitter and camel-http component to download the files. The route could like this from("aws:xxx").split().xtokenize("//path", 't').to("direct:http"); from("direct:http").setHeader(Exchange.HTTP_URI, simple(${body}).setBody(constant(null).to("http://example.com"); If using the Spring DSL, it would look like this <route id="get-download-url"> <from uri="aws:xxx"/>

Categories : Apache

Apache to weblogic ssl connection failure
It was the issue with certificate at the weblogic end. Certificate was missing key usage 'key encipherment' When certificate with key encipherment usage was imported at weblogic end, the connection was successful.

Categories : Apache

How to select custom layout to use in Apache POI
ok.. got an answer from a friend and got it resolved... XSLFSlideLayout detailedscorecard = null; for (XSLFSlideMaster master : slideshow.getSlideMasters()){ for (XSLFSlideLayout layout1 : master.getSlideLayouts()){ if (layout1.getName().equals("Scorecard")) { detailedscorecard=layout1; } } }

Categories : Apache

Apache proxypass and multilingual domains
It's possible. Just handle them in a single virtualhost and use RewriteCond to examine %{HTTP_HOST} and do the same rewrites you're already doing today. You can capture the country code and backreference it with %1.

Categories : Apache

mod_rewrite API paths
Try RewriteCond %{HTTP_HOST} ^api RewriteRule ^ http://%{HTTP_HOST}/api%{REQUEST_URI} [R=301,L] It is better to use more specific rules: ^api - host starts with api api. is not needed. HTTP_HOST already contains api. Use %{REQUEST_URI} instead of {REQUEST_URI} REQUEST_URI already contains first / sign Do not forget about RewriteEngine on

Categories : Apache

Issue in execution order with RewriteRules
Most likely it is happening due to your other rules. Better to use THE_REQUEST variable that doesn't change after application of other rules. You can also combine both your rules into one: RewriteCond %{HTTP_HOST} ^(?:www.)?(xyz|efg).com$ [NC] RewriteCond %{THE_REQUEST} /signdirections [NC] RewriteRule . http://%1.abc.com/en?utm_source=signdirections&utm_medium=advert&utm_campaign=%1 [R=

Categories : Apache

Enable CORS with wamp on windows 8
You must also activate the Apache Headers module. Using the wampmanager menus do this :- wampmanager -> Apache -> Apache modules -> headers_module Make sure this is ticked, if its not, click that menu item and wait a few seconds while WampServer restarts Apache.

Categories : Apache

Issue with Complex data types in pig
Pig has three complex types: maps, tuples and bags. These complex types can contain scalar types and other complex types. So, it is possible to have a map where value field is a bag which has a tuple where one of the fields is a map. Map: A map is a chararray to data element mapping which is expressed in key-value pairs. The key should always be of type chararray and can be used as index to acces

Categories : Apache

How can convert mod_rewrite rules to nginx rules
Try to improve you question-asking skills. It would be nice to see that you tried something of even checked you original configuration wihtout calling for help with a copy-paste (duplicate entry...). Automated tools can at best try to apply pre-cooked recipes or 1 -> 1 relations between Apache and nginx rules. They will fail at understanding what you wish to do and will most probably won't give

Categories : Apache

Elasticsearch vs Cassandra vs Elasticsearch with Cassandra
Cassandra + Lucene is a great option. There are different initiatives for this issue, for example: Stratio’s Cassandra Lucene Index - Derived from Stratio Cassandra, is a plugin for Apache Cassandra that extends its index functionality. (https://github.com/Stratio/cassandra-lucene-index) Stratio Cassandra, it's a native integration with Apache Lucene, it is very interesting. (https://github.co

Categories : Apache

Limit but not Order in PIG
By default LIMIT will execute ORDER command followed by LIMIT command internally, so obviously you will get the sorted list. There are many way to solve this problem, one option could be input.txt 1 2 3 4 2 1 8 3 4 4 3 3 7 2 5 8 4 3 PigScript: A = LOAD 'input.txt' AS (a1:int,a2:int,a3:int); B = RANK A; C = FILTER B BY ra

Categories : Apache


Recently Add
Spark SQL: unresolved attributes
How to create Apache service with custom httpd.conf file
Problems using .htaccess to make some pages secure and some unsecure
Can you cascade sliding time windows in sparks streaming
What is the difference between double and single quotes in pig?
Hive failed to show tables in warehouse
Reverse proxy: unwanted URL change
Storm - KeeperException
Accessing Spark SQL RDD tables through the Thrift Server
SOLR SurroundQueryParser can it come with NOT
How to test a moving server
Error Nutch No agents listed in 'http.agent.name'
Redirections with .htaccess
log4j2 how to disable "date:" lookup - log4j throws exception
301 redirect for all get request
Apache camel bindy
Spark how to execute one map action on only one work node?
.htaccess: How to remove subfolder's subfolder in URL?
apache AllowOverride /var/www/html but not /var/www/html/temp/
How to transfer the data from windows7 machine to windows 2003 server using ANT script or batch script?
Apache Pig Remove group element from bag
mod_rewrite does not rewrite, error.log shows no valuable information
Run script during HTTP request
Redirect subdomain to another subdomain same structure subfolder
Removing duplicate headers from HTTP requests
How to print the description of file in colored font in apache2?
Camel - data from two sources
Tomcat behind Apache using ajp for Spring Boot application
Spark Streaming: Could not compute split, block not found
Download a file using Camel based on a url in an SQS message
© Copyright 2017 spot7.org Publishing Limited. All rights reserved.