apache

.htaccess rewrite of a url [help with rule]

Hiya, I'm trying to rewrite a url of this: http://www.foo.com/bar/baz to index.php?q=$1&d=baz Where bar is not a fixed value, but baz is. RewriteRule ^(.*)\/baz$ index.php?q=$1&d=baz [L,QSA] RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] What i have above kinda works but unfortunately breaks all the includes in the site (css/javas...

Problem enabling .htaccess

I'm trying to enable .htaccess files on a Ubuntu server I set up. I changed the sites file from: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www> Options Indexes FollowSymLinks MultiViews ...

A general linux file permissions question: Apache and WordPress

Hi. I moved from a shared hosting to a VPS a few weeks ago and I'm having these annoying permission issues with WordPress. You know you can download and upgrade plugins (and wordpress itself) from the admin panel, but since I moved it started asking me my FTP credentials, which is kinda slow when I have to update ~20 plugins. I think th...

Python/mod_wsgi server global data

Hello All ... I have been looking into different systems for creating a fast cache in a web-farm running Python/mod_wsgi. Memcache and others are options ... But I was wondering: Because I don't need to share data across machines, wanting each machine to maintain a local cache ... Does Python or WSGI provide a mechanism for Python nat...

Disabling TRACE request method on Apache/2.0.52

By default, Apache 2.0.52 will respond to any HTTP TRACE request that it receives. This is a potential security problem because it can allow certain types of XSS attacks. For details, see http://www.apacheweek.com/issues/03-01-24#news I am trying to disable TRACE requests by following the instructions shown in the page linked to above. ...

Web Service Port No Question.

I am working on a web service project using gsoap. I am new to web services and have some basic questions. What should be the port no. of my web service? Currently this web service is a stand alone service listening to a hard-coded port no. of 22050. Client connects to this port and everything works fine. Is this approach OK? What are t...

How do you Require Login for Media Files in Django

I'm serving "sensitive" information in downloadable PDF's and Spreadsheets within a user registration section of a site. Is there a way to allow the django authentication to secure this media without serving it (and not have to manually login using basic auth)? I'm guessing theres (fingers crossed) not a way to do it with the psuedo co...

How can I rewrite query parameters to path parameters in Apache?

I currently have a website that I am trying to optimize in terms of SEO. I've got the site working with URLs such as: domain.com/?app=about In my app, $_GET[app] is set to 'about', as expected. Now, I want to make it so that a URL like domain.com/about is treated as if it were domain.com/?app=about. How can I do this in an Apach...

The Current State Of Serving a PHP 5.x App on the Apache, LightTPD & Nginx Web Servers?

Being stuck in a MS stack architecture/development position for the last year and a half has prevented me from staying on top of the world of open source stack based web servers recent evolution more than I would have liked to. However I am now building an open source stack based application/system architecture and sadly I do not have th...

MySql driver not installed error for Zend application

I am trying to get my ZEND application up on my apache server running on UNIX. Initially my host didnot give PDO support ,and i got it enabled by requesting them with a mail.But now I am getting an error saying The mysql driver is not currently installed The stack trace is like: An error occurred Application error Exception informatio...

How to run rails website permanently on Mac OS X

Hello guys, i've developed small web app for personal use with Ruby on Rails. Now when i want to use it I open Terminal and run ruby script/server to run mongrel then i go to Safari and type localhost:3000 to see my app. I'd like to have this site start automatically on startup of mac and possibly to use some other URL.. preferably just...

Folder control with .htaccess

I have a directory /public_html/myfolder/ and I want my domain www.example.com to point to /public_html/myfolder/ as my root folder. I figured that out, but problem is, my images are not showing. Here's my .htaccess file: Options -Indexes RewriteEngine on Options +FollowSymLinks RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC] Rewr...

fastcgi does not work - wrapper dowloaded not run

On my fresh Ubuntu 8.04 I installed virtualmin. Then I set up fastcgi as I did on my other server (Debian). Bu I have small problem. When I open website It instead of running fastcgi wrapper it downloads it. Here is config: <IfModule mod_fastcgi.c> FastCgiIpcDir /usr/lib/apache2/fastcgi AddHandler fastcgi-script .fcgi Fas...

apache syslog-ng error logs and access logs

Hi, I am trying to send all my apache logs to syslog-ng(on remote machine) which in turn writes to a file. so I configure syslog-ng this way source s_apache { unix-stream("/var/log/apache_log.socket" max-connections(512) keep-alive(yes)); }; filter f_apache { match("error"); }; destination df_custom { file("/var/log/custom.log")...

how to read comments in word document from apache poi ?

How to Read word comments (Annotation) from microsoft word document ? please provide some example code if possible ... Thanking you ... ...

Where does APC store its opcode and user variable cache?

The reason I ask is because when using top I don't see a process for anything like APC. So I assume that the memory usage would be accounted for in an apache process. Is that the case, and does that mean that the memory APC is using is replicated in each apache process, thereby taking up potentially much more memory than what was origi...

Apache listing folder contents in spite of index.html

Hi, I have an apache webserver serving 2 URLs. I use VirtualHosts to configure it so that the 2 URLs return different pages (one has docRoot = /www, the other has docRoot = /www/tutorials). The problem is that for a subfolder in the tutorials directory (say /www/tutorials/abc) which contains an index.html, using one URL displays the pag...

How to check if my shared hosting provider has mod_gzip installed?

Is there a way to check if my hosting provider has mod_gzip enabled? It's not mentioned in any info on the web site, nor there is a forum to contact other people about this problem. Thanks. ...

mod_deflate vs Django GZipMiddleware, which one to use for deployment?

We're deploying Django apps with Apache 2.2 + mod_wsgi. Should we enable mod_deflate in Apache or use Django's GZipMiddleware? Which option performs better? ...

Have a script to handle http errors.

I would like to have pretty 404 pages, as well as other error pages. I redirected all the errors (400, 401, 403, 404, 500, 502, 504) to my error.php. Apache provides a lot of information in $_SERVER variable. Do you know if there is good a ready script I can use for my error pages? ...