apache

How can I check apache modules version?

How do I get versions of apache modules on debian? I can get loaded modules list by apache2ctl -M - but how do I get their version numbers? ...

htaccess rewriterule for grabbing everything past hostname

I want an htaccess rewrite rule to grab everything past the host name and use it as an argument. For example, I want http://example.com/one to be handled by http://example.com/category.php?cat=one I think it should be simple, but I can't quite find the combination. Thanks ...

Apache configuration for Symfony website with virtual hosts

I'm trying to configure my local Apache2 server to host several Symfony websites using virtual hosts, but I just can't make it to alias lib/vendor/symfony/data/web/sf directory as /sf. I see that using %1 and %2 in alias statement is the source of the problem, but I can't find the right solution. I added to /etc/hosts entry 127.0.0.1 job...

using tar to compress log directory, what happens when apache tries to write during compression?

Hi! I want to run a cron and compress my /var/log directory every hour to a tar file.. so I can backup that file. What would happen to the log files the exact moment I run the tar command, will I miss those log lines or would the different softwares running and using /var/log wait, or will the tar be corrupt etc? I have a busy webserv...

How would I encrypt my php files so only a person with a key could access them?

I've done a project for a client and as part of the deal since they couldn't afford much we agreed that I own the code. however the server is in their name and they could go and steal the code. How would I avoid that? I would like only apache and me to be able to read the files! Any alternative solutions will be appreciated! ...

multiple instances of django on a single domain

Hi all, I'm looking for a good way to install multiple completely different Django projects on the same server using only a single domain name. The point is that I want to browse to something like: http://192.168.0.1/gallery/ # a Django photo gallery project http://192.168.0.1/blog/ # a blogging project This way, I can deve...

Non-dynamic custom HTTP headers

According to this Mozilla article on Ogg media, media works more seamlessly in the browser with an X-Content-Duration header, giving the length in seconds of the piece. Assuming that I have that length stored somewhere (certainly in a database, perhaps also in the filename itself (video-file-name.XXX.ogv, where XXX is the time in second...

Guide to install xampp with zope-plone on the same linux machine?

Is there a good step by step online guide to install xampp (apache server,mysql server) together with zope-plone on the same linux machine and make it play nicely or do I have to go through their confusing documentations? Or how can I install this configuration in the best way? I can install and use both seperately but in tandem is an is...

301 Redirect except for one person using .htaccess?

I recently migrated a WordPress site to a new server and new domain name. To redirect traffic from the old site to the new, I put in place a simple one-line .htaccess file: Redirect 301 / http://www.newsite.com/ Now, however, the client wants access to the old site. Is there a way that I can let one person in and redirect everyone else...

No POST data being returned when hidden input type is present

I think that there is either an error in my code, or my PHP or Apache is set up incorrectly. When I submit a form with a hidden field in it, I do not get any data in my $_POST array... When I comment out the hidden field in my code, the POST data is returned correctly... HTML FORM <form action='/utils/login.php ' method='POST'> <tabl...

PHP set warnings as fatal

Is there a way to specify in php.ini or apache level that the script execution should halt on any warnings? I tried searching through google and stackoverflow but couldn't find any relevant information yet. I do know about the set_error_handler() function but I am looking to do this at the php.ini level. ...

Subdirectory on a different host

I've got a site www.example.com on one server. I'd like to create www.example.com/blog on another server/host. A) Can I do this? B) How can I do this? I've read a bit on using Apache's mod_proxy, proxypass, and ProxyPassReverse, but I'm not gifted enough with Apache or server mgt to know if I'm on the right track or not. Or, if there...

When using SSL, Apache does not know where is the tomcat webapps directory

I configured the apache to use SSL - the server starts OK but when i connect to the server via htts, nothing happens. In the error log i see than the server looks for a SWF file, that should be loaded, in the Apache2.2\conf directory. Actually the file is in the \Tomcat 6.0\webapps directory. It does not happen when connecting to the se...

Multiple domains pointing to the same folder

Hello, I am currently running two websites. I am able to add my domains and set the root folder to / instead of /domain1.com and /domain2.com. That way both websites go to the same folder, however they both maintain their domain names (no redirects). My code determines whether the user is from domain1.com or domain2.com and displays the...

Apache/OpenVPN access restriction

Hi everyone, I'm Working on a developpement server where i've set a Virtualhost in order to make Zend Framework work has it's meant to. Problem is, I'm working with people who have dynamic ips: so I can't restrict (allow from) specific access for everyone. I've installed an OpenVPN server then, which gives every client an ip like 10.8...

Url routing errors in php in codeigniter

My login form on front page is displayed, but when it posts to other pages, the post does not happen. THe problem is that the url is like: http://sitename/users/action which is a 404 not found url. But when i hard code the path to controller, (that is, stop using base_url + "/users/action" and use base_url + "/system/application/controll...

multiple redirects with favicon crashing apache, using PHP5 and Kohana

I am not sure who the culprit is, but here's the apache error log using LogLevel Debug: [Tue Jul 13 11:51:18 2010] [debug] core.c(3069): [client 68.178.109.243] redirected from r->uri = /index.php/favicon.ico/favicon.ico/favicon.ico/favicon.ico/favicon.ico/favicon.ico/favicon.ico/favicon.ico [Tue Jul 13 11:51:18 2010] [debug] core.c(30...

mod_rewrite: redirect top level directories to a file

I'd like to redirect all top level directories to a file using mod_rewrite. So the following should redirect there: - http://example.com/test - http://example.com/test8/ - http://example.com/test_9231/ The following should NOT redirect there: - http://example.com/test.php - http://example.com/test_9231/test/ - http://example.com/t...

Apache mod_rewrite: can these simple RewriteRule be improved? And suggestions!

Hello, I started finally to understand Apache mod_rewrite. It's pretty GREAT! Plz have a look at the followings: 1) Permanent redirects "http://www.domain.com/folder_name/" (with or without final slash and with or without the 'www') to "http://www.domain.com/some/path/some_page.html" RewriteRule ^folder_name[/]*$ "http\:\/\/domain\...

Fields and codes in Apache FTP log

Hi folks, Where can I find information about the fields and codes in Apache's FTP logs? I am curious about what the "189" here means and the "a _ o r" also. Sun Jul 04 14:29:37 2010 0 xx.xxx.xx.xxx 189 /foo/bar/baz.php a _ o r [email protected] ftp 1 * c My google-foo failed me in locating this info. Where can I read up on these codes?...