apache

PAM authentication problem

I am using this module to authenticate using pam: http://code.google.com/p/web2py/source/browse/gluon/contrib/pam.py I can call authenticate('username','password') and it returns True/ False. It works for any 'username' but 'root'. My guess is that there is a security restriction in PAM that does not allow to check for the root password...

Apache forwards to virtual host instead of serving SVN

I setup svn on fedora, all correct folowing instructions. here http://www.ferdychristant.com/blog/articles/DOMM-6NFJ6J but when I am accessing /svn/repos/test apache forwards me to one of two virtual hosts defined in httpd.conf I have two instances of web applications running on tomcats. So apache confgiured with 2 virtual hosts using ...

.htaccess template

I made an .htaccess template; is there anything else that should be added or changed? # DEFAULTS ServerSignature Off AddDefaultCharset UTF-8 DefaultLanguage en-US SetEnv Europe/Belgrade SetEnv SERVER_ADMIN [email protected] # Rewrites RewriteEngine On RewriteBase / # Redirect to WWW RewriteCond %{HTTP_HOST} ^serpentineseo.com Rewrit...

How secure is .htaccess protected pages

Are there any known flaws with htaccess protected pages? I know they are acceptable to brute force attacks as there is no limit to the amount of times someone can attempt to login. And a user can uploaded and execute a file on the server all bets are off... Anything other .htaccess flaws? ...

RewriteRule to store thousands of files in subdirectories

I have a website that will have millions of pages in a directory. I'd like to store those files on-disk in a bunch of subdirectories based on the first characters of the page name. For example http://mysite.com/hugedir/somefile.html would be stored in /var/www/html/hugedir/s/o/m/e/f/ile.html That is fairly trivial to do with a Rewrit...

Simple PHP Server info request - not working at all

Going off of my other question and its pair. I'm looking to grab the Hostname:Port value as found in the phpinfo() function. I can't seem to find it anywhere and it's not in $_SERVER. ...

SVN 409 conflict on commits and updates

We have been using SVN for the past year now and when we migrated to an online server we started getting this error: Commit: Commit failed (details follow): File or directory 'x.php' is out of date; try updating resource out of date; try updating CHECKOUT of '/!svn/ver/491/x.php': 409 Conflict (http://svn.example.com) We are current...

Website files caching?

I want to know how long certain files like css, html and js are desirable to be cached by .htaccess setting and why different time setting for each file type? In few examples i saw that someone cache html for 10 mins, js for a month and imagery for a year. ...

Rewrite rules doesn't work apache 1.3

I'm using a couple of rewrite directives that always works before on apache2 but now trying a new shared hosting and the rewrite rules do not seem to get applied. I've reduced the .htaccess files to the following essential rules: RewriteEngine On Rewritebase /demo/ RewriteRule ^(.*)$ index.php/$1 [L] As you can see, i want to rewrit...

Apache POI change format from xlt to xls

I opened some xlt-file with Apache POI, changed it and saved it as xls-file. But if I open result xls-file with Excel and click File -> Save as... the type of file still will be Template *.xlt. So I need to save xlt-file as xls (not only change name, but format). Used code: HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream...

mod_rewrite rule to work with get method

I'm using this rule: RewriteRule ^(.*)$ public/$1 [L] and in public folder I use: $url = $_GET['url']; when I try to acess something on url using slash or it works fine and I get: /cities/display/45 => Array ( [0] => cities [1] => display [2] => 45) But when I try to submit a form, i'm not able to acces the data: /...

Debug CGI by simulation

I basically want to debug a cgi programm with gdb by emulating the environment variables and stdin stream. How do I set the variables and stdin? I am using lampp and gdb. Thanks! ...

Python fCGI + sqlAlchemy = malformed header from script. Bad header=FROM tags : index.py

I'm writing an Fast-CGI application that makes use of sqlAlchemy & MySQL for persistent data storage. I have no problem connecting to the DB and setting up ORM (so that tables get mapped to classes); I can even add data to tables (in memory). But, as soon as I query the DB (and push any changes from memory to storage) I get a 500 Int...

FastCGI C++ program and missing SCRIPT_NAME

Hi guys, i'm studying the fastcgi developement kit because i'm writing a new scripting language and i'd like to write a fastcgi version of the interpreter to run scripts as webpages. I'm using this example from the sdk, located at /srv/http/bin/echocpp So, in my httpd.conf file, i have the following lines : FastCgiServer /srv/http/b...

PHP script to replace cgi script

Hey, I have a CGI script that uses an old database driver that is no longer supported. Instead of struggling with this old cgi script, I thought it would be easier to rewrite it in php. It works now as a php script, but I need it to be served from the same web address. When a user accesses http://somesite.com/myscript.cgi, I want it to ...

http://localhost/mydirector/ - echo mydirectory and avoid 404 error on localhost

Hello, I have the URL http://localhost/mydirector/, I want to echo mydirectory and not have a 404 error. mydirectory does not exist as a directory, but is taken as username. I am using Windows/apache/MySQL,PHP. All this happening on localhost or 127.0.0.1 Thanks Jean ...

combination of open source licenses

Hi I'm about to release some software as open source. It uses Lucene (Apache license) and jopt simple (MIT license). Are there any constraints on the license that I am going to apply to my own software? In particular, it is an adaptation of Lucene for performing content-based search on audio (so, many classes are inherited and in one c...

Why is Django/FastCGI/Apache logging HTTP status code 200 for every request, even 404s?

Edit: I have now discovered that the status code is returned correctly, it just isn't recorded correctly in Apache's access.log. Title amended. This is still a problem. Any ideas? Original question follows. Hi all. I run the following stack: Django(svn) on WSGI on FastCGI on Apache on Dreamhost. Every page served by Django returns HTTP...

Multiple domains on apache server

First a quick disclaimer, I'm not a 'server guy' or a 'unix pro' or anything like that, I'm a web programmer who got stuck doing server works since I ran linux (ubuntu) on my netbook. I'm trying to set up an apache server running on Debian to automagically serve multiple domains, each domain needs to have its own directory in /var/www. ...

Apache FileUtils listFiles

Hey everyone I'm trying to get a List of directories. I'm using FileUtils listFiles(). I want to do something like this: listFiles(File,IOFileFilter,false). My real questions is how I can implement the accept() from the IOFileFilter so I can check if current File is a directory? Thank you in advance. ...