apache

Apache access control: Interaction between <Directory> and Order/Allow/Deny

Apache's Order/Allow/Deny directives are permitted within a <Directory> context. What happens when a set of these directives is present within a <Directory> for the current directory and within a <Directory> for a parent? http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order gives an order - Allow and Deny are evaluated dependi...

I installed XAMMP on my machine, where do I have to put my HTML files to view them?

If I enter 'localhost' on my browser, I'm taken to XAMPP's welcome screen so everything is installed correctly. What folder do I have to put my html files in? Thanks. ...

how to add ftp users to an apache from PHP?

how do i go about adding ftp users to an apache web server? i need the user to register from normal web/script and then have an FTP account set up for them automatically. I have seen the cPanel API, and it is pretty decent, but since cPanel costs money, i don't wish to use it for this project. I'm also reluctant to use any other lisence...

How do I access my own website hosted in my machine?

Forgive me if this is a stupid question. I am running XAMPP (lite) for developing my website. I can access it through http://localhost/mysite I wanted to view it on another computer (just for testing purposes), so I went to whatismyip.com, got my ip address, and tried to access the site from another computer using http://xxx.xxx.xxx.xx...

adsense iframes create new sessions on my server

Hi, I noticed that in my /tmp directory there are many session files. One visitor generates many (5-10-20) session files, but actually only uses one (it works fine). I figured that adsense iframes generate session files on the server that are not used. If I remove adsense I get normal one session per visitor. Any ideas how I can get ri...

Suggestions on RESTful Java Web Services Framework... ...

I googled some information about web services, it seems like a enterprise level application. I found that RESTful design is very cool idea on this. I find that Apache CXF looks cool, it support RESTful design and Java. It is a good choice for beginner to start writing an application using Apache CXF? or any other framework is suggested? ...

Conditional php_flag statements in .htaccess

Is there a way to conditionally execute php_flag statements in .htaccess? Here are two things I'm trying to do: Turn error reporting on if the client's IP address matches the IP address I use: if %{REMOTE_ADDR} == '12.34.56.78' then php_flag error_reporting 1 else php_flag error_reporting 0 Turn off register_globals if the IP a...

Links to files inside PHP/HTML code subject to .htaccess mod_rewrite too?

Just wanted to make sure: When I write: require('/path/to/file/file.php'); Is the file required with respect to Apache's mod_rewrite? (which seems unreasonable, since it should be there for user URL redirection) What I mean is, that if .htaccess sends all requests to "index.php", index.php would be required instead? And When inside...

How can you force a memory limit in Django WSGI apps?

I want my app to throw an MemoryError when its usage goes over 1GB. I'm running in WSGI daemon mode. I see 3 places the memory limit could be: apache.conf wsgi somewhere django configuration but I can't find the right config options. In PHP you can do this with : php_value memory_limit 1GB in your apache.conf ...

.htaccess and mod_rewrite help

Using mod_rewrite, how could I turn URLs that follow this pattern: http://example.com/index.php?id=14 Into this pattern: http://example.com/14/ ...

mod_rewrite ignored/not working

I am having some issues with mod_rewrite on a new Apache dev PC I have set up. I have enabled mod_rewrite as an apache module and editted the conf file to allow rewriting, however when I try creating rewrites nothing happens. The htaccess file is being invoked to some extent as I am able to cause a 500 error by putting invalid syntax i...

Why is $_SERVER['PATH_TRANSLATED'] repeating itself?

I'm trying to create a MVC framework when I noticed the $_SERVER['PATH_TRANSLATED'] variable is doing this: [PATH_INFO] => /test/test2/test3 [PATH_TRANSLATED] => redirect:/index.php/test/test2/test3/test2/test3 This is when I'm accessing the PHP file by http://domain.tld/test/test2/test3 Notice how it is repeating after /test/ T...

Apache+PHP write permissions on unix

I'm trying to launch PHP site with apache on fedora and I have a problem about writting permissions. It looks like apache does not have write permissions to some folders, but I canno understand why. I've checked httpd.conf and it has group: apache, user: apache. I then made: chown -R apache:apache www and set 777 permissions to the fol...

Apache rewrite URL but don't rewrite certain folder

I am using Apache to rewrite my URLs into clean URLs. RewriteRule ^(.*) index.php Currently this rewrites directories too, which is what I want, since I want everything run through my router/index.php file. What I would like to do however, is have one folder that I can access directly. This is for lib files such as .js and .css file...

appending a paremeter with .htaccess

Hi all, i'm struggling with an htaccess rewrite command what I have is RewriteCond %{HTTP_HOST} ^www.mywebsite.co.uk$ RewriteCond %{REQUEST_URI} !^/subfolder/ RewriteRule ^(.*)$ /subfolder/ I have a few URLs going to the same folder, some of them redirect to subfolders, which then run different templates. However, I also need to ap...

Cron jobs using php

Hi, I am trying to set a cron job using PHP and so far having no luck. I am following a tutorial PHP - Create a Cron Job with PHP The file is being created succesfully and all my permissions are correct but the job just dosen't get processed. Any ideas??? ...

How to serve PHP dynamic images efficiently on a LAMP server?

Right now I'm running a PHP script on my LAMP (CentOS/Apache/MySQL/PHP) stack that generates dynamic images using GD. I'm caching them on the hard drive for 5 minutes. If a cached version exists, I pull that instead of generating a new one. This saves CPU time, but since Apache is still running the PHP file it generates a new Apache proc...

Apache SetEnv appends REDIRECT_ . What gives?

For an application based on Zend Framework I use apaches SetEnv in .htaccess. I use this on test, staging and production servers like so: SetEnv APPLICATION_ENVIRONMENT production On the staging server I couldn't read this env var in PHP. However when I did a var_dump( $_ENV ) in php I got the value but the key was prepended with REDI...

Catching multiple levels of 'virtual' directories with htaccess

Currently I have the following rules... RewriteRule ^([^/]+)/([^/]*)(.htm)?$ index.php?filter=$1&page=$2 [L,QSA] RewriteRule ^([^/]+)/$ index.php?filter=$1 [L,QSA] Which basically catch anything in /dirname/page.htm Now there exists the chance that the script will have to intercept a variable level of paths, such as /dirname/twodirna...

Need help configuring 301 permanent redirect in Apache for non www

I am trying to configure my Apache 2.2 version to use a 301 permanent redirect when someone types my url without the www. I want to configure this in the httpd.conf and not using .htaccess if possible. I have tried using Redirect permanent but the first variable has to be a directory and not a url. Any ideas how to configure boom.com ...