apache

Filtering web folders via Apache and PHP

I'm looking for a way to filter and control access to a folder on a website. However, what I'd like to do is filter the access requests via PHP and Apache, a little like the way filters are implemented in Java. So, when a user tries to visit http://www.mywebsite.example/files/afile.zip I'd like it first to pass through a PHP script t...

CPULoad not reported in (Apache) server-status when load is zero

We're in the process of setting up OpenNMS on most of the linux machines in our infrastructure and just started to implement the various metrics that come out of Apache when ExtendedStatus is set to "on". We starting pointing OpenNMS at one of our cloud instances which - other than having apache and getting (literally) no requests ATM -...

How to send an automated email from Win XP Apache

I need to send myself an automated email once a day from my windows XP dev. machine. I've got Apache, PHP, and MySQL running here. I don't mind which email address the email gets sent from since i can add it to my address bar. I'm wondering though, what do i need to enable/install to be able to send emails? ...

Php-Django Chimera: is it possible?

I've seen a lot of posts about switching from php to Django but none have covered this. I have a website that is built entirely in php (php 5, mysql, and apache2). This site is used only for collecting data from users. Now I need to make a second half of the site to display the data. This will be step 2 of 5 in the overall plan, and I'd ...

Why is Django template feature breaking my page rendering?

To explain, I've taken a bare bones view from the tutorial of Django, and pointed it at an html page that I know works. When I do the following call: return render_to_response('index.html', {'stuff': 'blah'}) The resulting page is terribly broken in the sense that a lot of the styles are totally lost. However when I view the page sour...

how to configure xamp ?

hi all recently i installed xamp server on my VPS (windows xp sp3) and i installed mysite there i am successful to run my from http://localhost.com/mysite/index.php and http://xxx.xxx.xxx.xx/mysite/index.php (locally on my vps ,where xx.xxx.xxx.xx is my server IP ) but when i am trying to access the link http://xxx.xxx.xxx.xx/mysit...

Populating a JSP dropdown list with folder names

How do I populate a dropdown list (in a JSP page) dynamically with all the folders present in the same directory as the JSP page, on Apache Tomcat? ...

Submitting a form causes 412 error.

Hi, I'm working on a simple, one field, form that works with AJAX. Every time I submit the form and then refresh the page, I get a 412 error (Precondition failed: The precondition on the request for the URL /user.html evaluated to false.). Eventually this form will be AJAX, but right now, I'm just using jQuery to receive the click event ...

Force HTTPS on certain URLs and force HTTP for all others

I have a client project where I need to force HTTPS for a certain folder and force HTTP for all others. I can sucessfully enforce HTTPS for the folder I desire but then all links back to the rest of the site end up being through HTTPS. I'd like to have a rule which forces requests for anything 'not' in the secure folder to be forced back...

Apache.Httpd+Php or Apache.Tomcat+Java for large project

I want to start some large project. There are two technologies that i can use for it: 1. Apache.Httpd+Php 2. Apache.Tomcat+Java RDBMS is MySQL I need to select technology and argue the choice Thanks for advices ...

Free resources while waiting for remote gate in (PHP, Apache, Nginx)

Hi, My php script waits for remote gate response, normally for ~20 seconds. It causes apache httpd threads to live in memory with opened MySQL connection and finally to exceed MaxClients value. How it can be managed to free idle resources until remote gate reponse. One solution is: 1) run remote gate request and then redirect user to ...

How to display a web page just before Apache basic authentication (with exclusion list)?

I have web page running on the Apache. Web page is using Apache basic authentication. So when user tries to access certain page - must enter user/pass before to get authorised. I would like to display notification (except a list of IP addresses) screen with accept button just before authentication. Other comments on above: I can't sto...

problem disabling mod_authz_host to avoid dns lookups

hello, i'm using Debian 4.3.2-1 and Apache 2 in my production server. Watching the logs I noticed apache is resolving client's hostnames with 'HostnameLookups Off' in apache2.conf. I want to avoid these lookups so i'm guessing apache is making this dns queries because i have mod_authz_host enabled. When i try to unlink this module i get...

Using Python with WAMP

I use WAMP for my PHP and MySQL development. I want to start learning Python for use in web development. Is there a way for me to use Python within WAMP? ...

Apache ErrorDocument with absolute path

I have a server with several virtual hosts. Now I want to set up the error documents for the whole server. I have located my error sites in /var/www/error/*, but with the ErrorDocument Directive I am only able to set the error document relative to document root, but I want to use the absolute path (e.g /var/www/error/404.html). Has anyo...

What's the importance of htaccess, where is it located, and how do I know if mine is correct?

I've never worked with an htaccess file and so I'm not sure if I have anything correct in it and I'm not sure if I'm supposed to have one. I've looked up some documentation and there hasn't been much help. Is it essential to running an apache server to include an htaccess file? ...

WAMP Setup - Connection resets when php tries to access mysql

I'm trying to install wordpress on a server running windows 2000 (not server edition), apache 2.2, php 5.2.9, and Mysql 5. When I get to page 2 of the setup, where it tries to connect to MySQL to add the tables, the connection is reset. This isn't an isolated error because the same issue is happening when I try to log in to phpMyAdmin. ...

Apache permissions to serve file...

I have a folder on my webserver (apache), which contains gnupg public keys: \myfolder --- my.gpg --- your.gpg They are chown apache:apache. I want to make the permissions as strict as possible but leave it possible to have a user view the file online (http://mydomain.com/files/my.gpg). Why do I have to give the file execute permis...

Redirect script.js to script.php

I have some javascript that is generated by PHP. Currently I am including the javeascript in the html using <script type="text/javascript" src="js/script.php"> But I want to use <script type="text/javascript" src="js/script.js"> Now script.js does not exist, but I want it to redirect to script.php without the user knowing. Can thi...

Making ExpressionEngine .htaccess allow commenting on index.html

I've got a really quirky issue going on with ExpressionEngine. I've got a live test site here. Essentially, if you attempt to comment on the index's 'Question of the Day,' you get a proper redirect, but the comment never gets to the database. If I remove my .htaccess and set the site's index page in my control panel to index.php, then ...