I need to set up a test environment on my XPSP3 machine that runs Apache, MySQL, and PHP. My original test environment was an old box that ran those three under Win2k. That box died. Running on Windows was never optimal because the ultimate hosting environment is CentOS Linux.
What is the most straightforward way to set up a virtual mac...
I have a small VPS server that has a Nginx front end that serves up static media files and passes Django requests back to an Apache 2.2 prefork MPM server running mod_wsgi.
With one (very) small site loaded and working, it's currently using 143MB of 256MB of RAM.
Using the top command I can see that Apache is using 52.9% of available R...
What's the most reliable, generic way to construct a self-referential URL? In other words, I want to generate the http://www.site.com[:port] portion of the URL that the user's browser is hitting. I'm using PHP running under Apache.
A few complications:
Relying on $_SERVER["HTTP_HOST"] is dangerous, because that seems to come straight ...
I've been trying to mug up on Glassfish and one thing that keeps coming up is the "how-to" on fronting Glassfish with Apache. Unfortunately, I have yet to find a description of why you would want to do this!
From my experimentation, Glassfish seems like a pretty fully featured web server-type service; but I might be missing a lot. So, i...
i mean the
HTTP/1.1 xxx yyyyyyy
header
i can modify all others with mod_headers
but want to be able to return a status 200 for 403 error pages to a particular user-agent that dosn't display the text of my 403 pages {it displays an alternate page}
just asking if anyone knows an env-var or header name i can alter in apache.conf to alter...
It is painful to fish out things from apache error_log. Does anybody have pointers to some better error collection mechanism. Something like what is described in "Using FogBUGZ to Get Crash Reports From Users - Automatically!", but for a PHP/apache webapp
More specifically, some mechanism to hook the errors that is thrown by PHP to some...
So far I include everything in index.php:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?page=$1 [QSA,L]
There are also pages where I use $_GET like this:
SELECT * FROM news WHERE id = ".intval($_GET['id'])
If I want to view a news I type news?id=1
instead of ?p...
I am interested to offer both hosted and SaaS version of my application. Now, SOers suggested that I map the URLs to MySQL databases. What I can think of is something like this
companya.mysoft.com will have the MySQL database that starts with the name companya*. i.e., compana_mydb
companyb.mysoft.com will have the MySQL database that s...
Hello!
I'm trying to create clean URLs on my website. Now I succeeded in configuring apache so every request like mysite.com/page will work. But I also want that requests for mysite.com/page.php will be redirected to mysite.com/page. I've set environment variable in .htaccess to check if i already been redirected to prevent loops, but i ...
I only recently found out about URL rewriting, so I've still got a lot to learn.
While following the Easy Mod Rewrite tutorial, the results of one of their examples is really confusing me.
RewriteBase /
RewriteRule (.*) index.php?page=$1 [QSA,L]
Rewrites /home as /index.php?page=index.php&page=home.
I thought the duplicates might ha...
I've finished making a site in django called 'kazbah', and I'm trying to deploy.
All the code for the kazbah site is in /home/git/DjangoProjects/kazbah and my httpd.conf looks like:
<Location "/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE kazbah.settings
Python...
I have a highly trafficked application on one debian machine and apache has started acting strange.
Every time I start apache, tons of apache processes are spawned, the app doesn't load at all, and very quickly the whole machine freezes and must be powercycled to reboot.
Here is what I get for top immediately after starting apache:
...
I have beeen looking around for a way to add code highlighting to my Subversion and Apache installation that hosts my local subversion projects. It runs on Fedora Core 10 installed in a VM. I would like to use syntaxhighlighter but I have not idea how i can get Apache to automatically insert the required javascript into my source code fi...
We plan to install a Subversion repository in an environment where the network is quite slow on its own.
The previous VCS used there was VSS, and it was a nightmare to use it (not only because of its "feature").
So, my question is the choice between Svnserve and the apache module. I know that the apache module will be slower due to the ...
Is there any tool specially designed to analyze Apache traffic logs and give some advices on future load (bandwidth & requests per second)?
I am searching for some tools to help me understand better how the server is used and where the performance bottleneck will appear.
...
I have an ArrayList a collection class of java as follows.
ArrayList<String>animals = new ArrayList<String>();
animals.add("bat");
animals.add("owl");
animals.add("bat");
animals.add("bat");
As you can see the animals ArrayList consists of 3 bat elements and one owl element. I was wondering if there is any API in collection framework ...
The Windows file-systems (FAT, NTFS) do not care about the case of file names (case-insensitive). Consequently programs - like the Apache web server - running on windows handle file case-insenstive.
When you create web sites on Windows you inadvertently create links, etc. that do not match the case of the actual file name. You usually n...
I have PHP 5.1.6 (cli) installed and whenever the GET query string is more than 128 characters it fails with HTTP 406 Not Acceptable error. Any suggestions how I can fix this so can use more than 128 characters? POST is not an option.
The error is being returned by the server so don't think it's browser issue.
And the reason I think it'...
I need to connect to an MS SQL Server database from a PHP script running on a Linux server. I'm looking at using FreeTDS as there is no official MS SQL Server driver for Linux. Is this my best option? Is it ok in a production environment? Are there other options, perhaps ODBC?
...
Would someone with first-hand experience be able to tell me if there are any differences between the Apache installation that comes with OS X 10.5 Leopard and OS X 10.5 Leopard Server?
...