apache2

Init modules in apache2

Hello, I used to write apache modules in apache 1.3, but these days I am willing to pass to apache2. The module that I am writing at the moment has is own binary data, not a database, for performance purposes. I need to load this data in shared memory, so every child can access it without making his own copy, and it would be practical to...

How can I make a virtual host accept multiple domains?

I have two different domains I want to use for this website, how can I configure the virtual host to make this work? Is it possible to assign it more than one server name? Help! ...

Cannot Call WordPress Plugin Files Under wp-content

I have a client who has many blog customers. Each of these WordPress blogs calls a plugin that provides a product link. The way that link is composed looks like this: {website}/wp-content/plugins/prodx/product?id=432320 This works fine on all blogs except two. On those two, when you try to call the URL, you get a 404. So, I disabled a...

Apache server-side files caching via .htaccess?

Hi, I'm starting new website and gonna include several JS libs and would like to know how .htaccess file template should look like with caching of media and JS files on? Whats better for compression, GZip or Deflate? Is it better/faster solution to serve those JS libs off the Google CDN perhaps then locally? I'm asking CDN question s...

.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...

Can't Install libcurl PHP on Ubuntu Linux

I am trying to use the new facebook api and it requires libcurl PHP. I used sudo apt-get install php5-curl sudo apachectl -k restart And it didn't work. I get the same error and the phpinfo() page says nothing about libcurl. The source of this problem is probably that I built some of the tools from source (apache2, php), but the...

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 2 mod deflate strange behaviour

Apache compress content only if receives "Accept-Encoding: gzip" in request header. If i set "Accept-Encoding: deflate" then Apache would not compress the response anymore. Does mod_deflate use gzip compression algorithm or deflate compression algorithm (aka zlib)? ...

IP Blocking on error logs PHP

Is there a way to block error logging from a specific set of IP's ? Basically macafee carry out a range of testing on the server nightly and we don't want to record these in our error logs. Is there a good way to avoid this from happening ? Hope you can advice! ...

apache error log for rewrite rule

Hi, i am getting following error in apache log File does not exist: D:/wamp/www/script/products, referer: http://localhost/script/products/category/product-123.html whenever following url http://localhost/script/products/category/product-123.html is parsed through this rewrite rule RewriteRule ^products/([~A-Za-z0-9-"]+)/([~A-Za-z0-9...

Getting "open_basedir restriction in effect" in spite of adding the correct entry.

I am trying to create a shared hosting scenario, using open_basedir option of php. I am doing this by adding the following to apache2.conf <VirtualHost *:80> ServerName lt1.example.net DocumentRoot /home/akshat/example/tmpblogs/tb1/ php_admin_value open_basedir /home/akshat/example/tmpblogs/tb1/ </VirtualHost> <VirtualHost ...

Zend Framework - Deny access to folders other than public folder

All, I have the following Zend application structure: helloworld - application - configs - controllers - models - layouts - include - library - public - .htaccess - index.php - design - .htaccess Currently, if the user visits, http://localhost, my .htaccess files above make sure, the request is route...

Apache rails beta site access solution

I'm building an ror site and have been asked by to put a temporary access restriction on it. All that's needed is a general access restriction to be used by beta users. The site is deployed on an apache server (on a mac) using passenger. I'm wondering what solutions there are? ...

Zend - Deny access to CSS, JS, Image files

All, I have the following Zend application structure: helloworld - application - configs - controllers - models - layouts - include - library - public - design -- css -- site.css -- js -- global.js -- images -- siteheader.gif -- sitefooter.gif ...

How do I restore an Apache configuration after a hard restart?

I installed Apache on my Ubuntu server, and when it installed, it created a directory ~/Apache/ with directories such as htdocs, logs, cgi-bin, etc. I was then able to create several pages and scripts which I placed into the corresponding directories (~/Apache/htdocs, ~/Apache/cgi-bin), and I was able to serve these files on the web. Un...

How are data shared between fastCGI processes?

I've written a simple perl script that I'm running via fastCGI on Apache. The application loads a set of XML data files which are used to lookup values based upon the the query parameters of an incoming request. As I understand it, if I want to increase the amount of concurrent requests my application can handle I need to allow fastCGI t...

apache alias and .htacess willing to understand configuration?

On our local dev enviornment we had just one server and to add far future expires and cache control header to static images we kept a .htaccess file in the root of the application things worked fine. But on our prod we have multiple apache servers having aliases to a code base on a different server. Here in this case i am not sure where ...

Why do I have a page hit for 404.php after each legitimate pagehit?

I'm working with an intranet system that, on each page, checks the user's cookie, verifies that they can see the current page based on database permissions, and records a page hit that includes their id and the page URL. I just noticed that in the pagehits table, I see an entry for 404.php (my custom 404 page specified in the Apache con...

JavaScript: document properties

Hi, is there a "document" property named ssh? It's a simple question. I've seen this in some code at work, but no one in the office wrote the code, so I'm stucked. The line was document.ssh.firstPing(...) firstPing was a method in the code, that is writen in js+php. But I've searched with eclipse throughout all the code and there is ...

Tomcat/Apache Redirect for different file extensions or web directories

Is there anyway possible to create a way for tomcat to render files out of one directory and apache to render files out of another? I have a java based CMS (Liferay) running on my ubuntu server running with Tomcat 6 and Apache 2... but I also have several PHP applications that need to be ran as well... Is there anyway to run PHP files ...