apache

how can i reference $_SERVER['DOCUMENT_ROOT'] in a .htaccess file?

How can i reference the document root from within an htaccess file? ie: i currently have php_value auto_prepend_file C:/wamp/www/hf_latest_desktop/prepend.php but i would like php_value auto_prepend_file **AUTO_DOC_ROOT**prepend.php where '**AUTO_DOC_ROOT**' the root path ...

how to install new oracle apex theme?

I'm trying to install new apex theme but the problem is that I don't know where to put theme images folder in apache webserver? I tried to put it on the apache/images but this doesn't work So does anybody know where to put the images folder Note: I have successfuly imported the .sql file and already switched the theme to the new one. ...

What NoSQL solution is best to store Apache error_log and access_log? Cassandra or MongoDB?

We have developed PaaS solution for PHP. As part of that we offer developers to see Apache error_log and access_log files through our API. Currently we write the logs into files on disk seperated per deployment (vhost). Since this doesn't scale too well with a higher number of nodes and deployments, even though files are on distributed...

Mass 301 redirect using .htaccess

I am working on a large project that involves taking thousands (30,000+) static web pages and turning it into to a CMS. The issue is many of these pages are duplicates within their directories. I want to keep the SEO intact by using 301 redirects, however, I am not sure how to go about doing such a large redirect (301). Here is an exam...

Rewrite rule does not pass $1 when using ! ?

I am using this rule: RewriteRule !^(.*?/.*|.*?\.(?:php|html)$)$ headers.php?a=$1 [L] (based on the great contributions on http://stackoverflow.com/questions/3345747/regex-match-this-or-that) It rewrites to headers.php when I type localhost/foo but the a variable is empty instead of foo (I checked with var_dump($_REQUEST)) Any idea ...

apache, php config

I'm running a php application which responds to the client in about 1 minute (keeps loading all this time) . However the response is displayed all at once so I would like to know if there is any config in the apache server/php to display the response at the time is processed . For example I have echo "test"; $rez = file_get_contents(...

DJANGO allow access to a certain view only from a VPN Network

Hello I am trying to specify the access to a certain django view only to a client calling from a VPN IP (10.8.0.3 ) My django server is supported by apache using the following .conf <VirtualHost *> ServerAdmin [email protected] DocumentRoot /home/project/virtualenvs/env1 ServerName client1.project.cl ServerAlias ww...

Apache TomCat problems

Here is the situation. I reinstalled NetBeans 6.9 to my desktop and the basic application is working fine as far as i can tell. During the installation I purposely loaded Tomcat and not Glassfish. It gave me that option. Tomcat is loaded under my Program Files directory and i confirmed it by going to my control panel. I have a short ap...

How to run a c program on apache 2.2 server?

Hi experts, I'm doing a OpenSSL project and I'm completely new to web server. I've got a client.c and server.c. client.c creates a connection to the server on port 6008 and reads data from stdin and then send those data to the server. The server.c reads data from socket and writes it back out to stdout. I've got the server.c compiled o...

mod_rewrite for friendly urls unexpected behaviour

I have Apache and I have this in the .htaccess file: RewriteEngine on RewriteRule ^myhome myhome.php because I want to redirect /myhome/ to /myhome.php. It works, but it behaves unusually. When I type in myurl.com/myhome, it redirects to myurl.com/myhome.php correctly, but when I try myurl.com/myhome/ with the slash at the end, it red...

php and non existing files

on my site i call non existing files and it show index page not error 'not found page'. but i need to get this error, any ideas? update here my htaccess file # BEGIN WPSuperCache <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / AddDefaultCharset UTF-8 RewriteCond %{REQUEST_METHOD} !POST RewriteCond %{QUERY_STRING} !.*=.* Rewrite...

PHP not saving sessions on subdomain, ok on domain

We have a CentOS 5.4 server serving a number of our websites. The server is managed by Plesk 9.2.3. Our websites are developed in php. We have our main domain ourapplication.co.uk in /var/www/vhosts/ourapplication.co.uk/httpdocs, and our subdomain api.ourapplication.co.uk in /var/www/vhosts/ourapplication/subdomains/api/httpdocs The fo...

Differences between the way WAMP and XAMPP handle vhosts?

I'm switching from WAMP to XAMPP and XAMPP has broken my vhosts. It won't allow access to them. "You don't have permission to access the requested directory. There is either no index document or the directory is read-protected." The Apache error log says: "[error] [client 127.0.0.1] client denied by server configuration...

Tomcat6 behind Apache2.2 proxy with SSL

Hello, I use Apache 2.2 with SSL as proxy(mod_jk). Behind it running tomcat6(without SSL) . When I use http connection everything work ok eg. for tomcat manager "http://localhost/manager/html", but when I try "https://localhost/manager/html" I get "The requested URL /manager/html was not found on this server" message . Should I add somet...

Apache POI HWPF - problem in convert doc file to pdf

Hi. I am currently working Java project with use of apache poi. Now in my project I want to convert doc file to pdf file. The conversion done successfully but I only get text in pdf not any text style or text colour. My pdf file looks like a black & white. While my doc file is coloured and have different style of text. This is my code,...

Determining if the HTTP scheme is https or http in mod_perl2?

I need to work out if an incoming request is using SSL in a mod_perl environment - how can I do this reliably? ...

Pagination script - getting data from two tables

I have a pagination script, which can be seen here: http://www.automotori6282.tk/phpsandbox/ This is the source code: http://pastebin.com/raw.php?i=63dCvfxD (PmcPagination.php) http://pastebin.com/raw.php?i=3k4nqwRB (demo.php, the page with the code in) and index.php for http://www.automotori6282.tk/phpsandbox/ simply uses PHP's incl...

Using mod_rewrite to redirect unsupported language codes

Hi there- I'm developing a multilingual site, and I'm using language identifiers in urls in conjunction with a front controller such that visiting http://www.domain.tld/en/content or http://www.domain.tld/de/conent will pull up content localised in those languages. If the site is visited without specifying a language identifier, th...

Spring 3.0 JAX-WS and or vs. Apache CXF

Spring 3.0.1 has solid JAX-WS web services support. At the same time, I see that many articles refer to Apache CXF as a great web services framework. If I work in the Spring/Hibernate world and want to expose the high-performing web services to the front end, should I consider utilizing Apache CXF? Is there any advantage to adding this...

Apache Start Problem on Windows

I just installed the apache 2.2 http server and I get this error message whenever I hit start: How do I solve this? ...