apache

apache records in url

I've been seeing this type of url: http://someurl.com?someid=4387&anotherid=1234&yetanother=7365456 And I've seen a modification of that url like this: http://someurl.com/4387/1234/7365456 Also I think I've seen it like this too: http://someurl.com/4387/1234/?yetanother=7365456 What exactly is this called? And is thi...

Rewriting static files in .htaccess

Hello, I have application in subfolder http://example.com/some/other/sub/folder/. And .htaccess file: RewriteEngine on RewriteBase /some/other/sub/folder RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?p=$1 [QSA,L] Template files contain absolute URL to the ...

"The Social Network" movie - how to watch logs in real time via Terminal?

This is a basic question - in the movie "The Social Network" there are several scenes when the young Facebook staff is watching the PHP/Apache server logs on in their TERMINAL in real time. I'm familiar with how to do this in a RUBY/RoR environment - but with a standard LAMP Apache/PHP environment, how to do actively monitor your server...

mod_security + apache + geoip block != 404

I have plenty of bots accessing the site trying to find holes and stuff like that, so my idea was to block all non .se visitors (i dont mind google getting blocked either), that part works like a charm, but the response is 200, but i would like to give them 404 instead, any ideas? I have this in my apache.conf <IfModule mod_security2.c...

php encrypted ssl session data

I have 2 servers running, one for the dynamic content (nginx, php) and another for login (apache2, php) i use memcache to share the session information i upgraded the server software and since then the session data in apache is encrypted apache: session::write("sessions/s53mqdhghmlrvnvjt05novt4m2","encrypted-data",0,1440) nginx: se...

Integrate Apache JDKIM with Apache James

I'm trying to add DKIM (DomainKeys Identified Mail) to my Apache James mail server with no luck. Can someone please direct me to some documentation on how to integrate JDKIM (or JavaDKIM) with Apache James? Thanks in advance ...

Question mark in URL for PHP variables makes the link broken. Any idea why?

I don't know what changed in the past--this used to work: Accessing a URL on my server like the following, doesn't work: http://www.domain.com/folder/file.php?variable=a&amp;variable2=b I'm getting a "Not found The requested address 406.shtml was not found on this server." message. However, if I access this, it works: http://www.domai...

redirection page help -apache

Hi, I have a folder where in there is a .htaccess file with some settings .. so when i try to load the page .its asks for authentication . so when i dont give the user name and passwd . it redirects to a page. i need to know where this redirection settings are there . how to get to the core. ...

Throw 404 when requesting file unless HTTPS

I need to create a condition in my .htaccess file that will give a 404 when a user requests a file over HTTP, but not when they request it over HTTPS. I have about 15 files in the same directory that this needs to happen with (but not the others). ...

Fatal error - execute() php 5.2.13

Hello there, I have PHP 5.2.3, apache2.x, mysql 5.x on a Linux machine. EVerything was working fine untill yesterday. This morning all of a sudden one of the php files started to throw "Fatal error: Call to a member function execute() on a non-object in". I use PDO (prepare, execute, close cursor etc). Have you ever come across this ...

Recompiling mod_auth_mysql for future modification.

Hey, I'm trying to compile this UNMODIFIED apache mod in ArchLinux so I can modify it later on, but I'm a nub... apxs -c -L/usr/lib/mysql -I/usr/include/mysql -lmysqlclient -lm -lz mod_auth_mysql.c /usr/share/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -march=x86-64 -mtune=generic -O2 -pipe -DLINU X=2 -D_REENTRANT...

Can you explain the outcome of this Apache setup?

I had a very strange behavior with my Apache setup and then fixed it, however I would like to understand what really happened. My httpd.conf LOOKED like this: <VirtualHost *:80> ServerName mysite.com ServerAlias www.mysite.com ... <Directory "/path/to/mysite.com"> </Directory> </VirtualHost> === THEN, I wanted to add a 2nd d...

How to fix the directory that shows me a "forbidden" message when i open it in the browser?

I was using a hosting to run my site, lately it has been working fine but today i opened the site in the browser at "http://www.arquisanjose.org/ver2" and shows me the following message: i´ll appreciate some of your help... ...

PHP File upload, Secure?

This is what I want an user to be able: Upload ANY file to the server (attachment) to the uploads folder Be Able to download it afterwards So I have created this dir with the following .htaccess Allow from all DirectoryIndex .x php_flag engine off Options -Indexes Options -ExecCGI AddType text/plain .html .htm .shtml .php .php3 .php...

use RewriteMap in htaccess file

How can i use RewriteMap directive in htaccess file? When i put it there i get "RewriteMap not allowed here" error. I know this error will disappear when put it in httpd.conf or virtualhost configuration file. But i want to know is it possible to put it in htaccess or not? ...

How do I add a new virtual host to my apache?

<VirtualHost mydomain1.com:80> ServerAdmin webmaster@localhost ...stuff here </VirtualHost> <VirtualHost mydomain2.com:80> ServerAdmin webmaster@localhost ...stuff here </VirtualHost> This doesn't seem to work. Before, it was <VirtualHost *:80> and it worked. ...

Apache user privileges in Centos

Hi I'm using the shell_exec command from a PHP script: $output = shell_exec('ls -l'); print_r($output); Terminal: php test.php Which results in the directory listing as expected. Switch to my browser I get no output. I need to grant privileges to the user 'apache' so that it can execute certain commands, or add the user to a group ...

Why doesn't my custom RewriteMap program return the expected results?

I want to redirect some urls with id = n to id = n + 1000 (where n is a variable). After searching on the internet I found out that I can do this using a prg type RewriteMap directive. However, I ran into some trouble getting it to work. The code I am using to test using a custom RewriteMap is included below. This is my test.pl file th...

Apache - Self assigned SSL Help

Hi, How would I self assign a SSL Cert on Apache (XAMPP) on a Windows 2003 server? I have researched and the farest I got was a broken SSL Cert with "Common name" problem. Post your guide or links here, Thanks. ...

Set Content-Disposition header to attachment only on files in a certain directory?

I've got this this rule in my htaccess file to force linked files to download rather than open in the browser: <FilesMatch "\.(gif|jpe?g|png)$"> ForceType application/octet-stream Header set Content-Disposition attachment </FilesMatch> Is there a way to alter the RegExp so it only applies to files in a certain directory?\ Thanks ...