We have a web based application in production built using django. It is deployed on nginx proxied with apache which handles the django app via WSGI. OS is Ubuntu.
In addition to the web based front-end, we recently developed a J2ME client for uploading files via mobile phone. The J2ME transfers the file with Transfer-Encoding set as "Ch...
I'm implementing a slug system for my website at the moment. I plan to redirect invalid slugs to the correct on that is stored in the database.
E.g.
http://example.com/11/wrong-slug
Hit db, check if 11's slug is wrong-slug if not do 301 redirect
http://example.com/11/right-slug
Detect 301 and inform user that they foll...
I am running Apache 2.2.13 and PHP 5.2.12. Just installed PHP 5.2.12 manually (to have access to all extensions) and enabled OpenSSL. phpinfo() indicates OpenSSL is enabled and running OpenSSL 0.9.8k 25 Mar 2009.
I'm getting this error: PHP Fatal error: Call to undefined function ftp_ssl_connect().
I've seen where the PHP manual sugges...
I've put a .htaccess file in my main directory of my lighttpd website like this:
url.rewrite-once = (
"^/cat.php$" => "index.php"
)
And I have enabled mod_rewrite and mod_redirect in my lighttpd.conf and restarted lighttpd server.
But unfortunately when i type mydomain/cat.php i got error page 404.
I've found that in Apache ther...
Hello all,
I have a PHP script that keeps stopping at the same place every time and my browser reports:
The connection to the server was reset
while the page was loading.
I have tested this on Firefox and IE, same thing happens. So, I am guessing this is an Apache/PHP config problem. Here are few things I have set.
PHP.ini
max...
Hello all,
I am trying to setup PHP to log errors locally so that I can solve this problem.
However, I can't even get this to work. I have followed this tutorial, but nothing. Does it only log fatal errors or what?
Is there anything else I need to make sure of?
...
I'm trying to log download statistics for .pdfs and .zips (5-25MB) in a rails app that I'm currently developing and I just hit a brick wall; I found out our shared hosting provider doesn't support mod_xsendfile. The sources I've read state that without this, multiple downloads could potentially cause a DoS issue—something I'm definitely ...
I am using php on an Apache server. I am unable to set expiration headers in .htaccess on the server that I am working on, as it is a shared server and they (the web host) will not install the mod_expires module in the apache build.
I have always used the "ExpiresActive On" and set the default cache expiration for images, js, xml and tex...
I have written the following code in my .htaccess file
Options +FollowSymLinks
RewriteEngine on
RewriteRule page/(.*)/ index.php?page=$1&%{QUERY_STRING}
RewriteRule page/(.*) index.php?page=$1&%{QUERY_STRING}
The url "xyz.in/index.php?page=home" will look like this in the address bar of browser "xyz.in/page/home"
If I want to pass a ...
I have a cronned "cp *.html" command that runs every minute on an OSX box. The source files are regenerated from a database and written to the source directory just fine. The cp command usually picks them up and refreshes the copies in /Library/WebServer/Documents (this is for a quick-and-dirty internal website that monitors one of our...
I have a PHP scripted named index.php inside a folder named blog. There are three different views.
http://www.myDomain.com/blog/index.php
http://www.myDomain.com/blog/index.php?tags=list of categories
http://www.myDomain.com/blog/index.php?post=name of post
I would like to change the view based on the URL.
/blog redirects to numbe...
I am using Apache 2.2.14 and Python 2.6 for CGI on Windows XP. Files sent through CGI get corrupted. A CR gets inserted before every LF. Firefox, IE, and Curl clients give the same result. The file is the correct size, but CR's are inserted throughout, and the data is shifted down and truncated. I can look at the file on the server, ...
I seem to be having a hard time getting the Apache module for Hyperic to compile in Ubuntu 8.10. Has anyone had any luck getting it to work? Does anyone have a precompiled version?
I am running Hyperic HQ version 4.1.2 build #1053, Apache 2.2.x
...
We have a client that is closing its doors. We want to redirect all traffic that goes to their domain to a new page index.html with a few images in the _img subdirectory. (The page explains what happened, what current customers can expect with their current orders, etc.)
I've read about possibly using HTTP 410 Gone as the best way to te...
Hello all,
I have huge PHP script which I have been running on Apache 2.2.12 and I have recently upgraded to Apache 2.2.14. However, my PHP script doesn't work as it stops at a certain point all the time. I have been trying to work out what the difference is in these two Apache versions, I have looked at this CHANGELOG and have not been...
For apache velocity, is there a difference between accessing variables with $ vs. $!{}. If so, what is it?
...
CheckSpelling On
RewriteEngine on
RewriteCond %{HTTP_HOST} ^([^.]+)\.site\.com$
RewriteCond /home/%1/ -d
RewriteRule ^(.+) %{HTTP_HOST}$1
RewriteRule ^([^.]+)\.site\.com/media/(.*) /home/$1/data/media/$2
RewriteRu...
I have a basic CMS in PHP/MySQL where content managers can create pages to the system for public viewing. Each page is then available at an url such as http://www.example.com/pages.php?pid=123
Now, I want to redirect requests to http://www.example.com/pages.php?pid=123 to http://www.example.com/pages.php?pid=456.
I've already removed th...
How can I transform:
http://example.com/about.php
http://example.com/hello/deep.php
http://example.com/hello/world/deeper.php
Dynamically, into URLs like:
http://example.com/about/
http://example.com/hello/deep/
http://example.com/hello/world/deeper/
...
So I'm trying out JSP for the first time. I found a tutorial that details the installation of the tomcat server and the mod_jk Apache module, but it's a bit outdated. Right now, I've got everything installed and the mod_jk.so file in the modules folder, along with the corresponding loadModule line in the httpd.conf file. The tutorial tel...