apache

socket: Too many open files (24) apache bench lighttpd

When I start Apache Bench test: ab -n 10000 -c 1300 http://domain.com/test.php I get error: socket: Too many open files (24) When i change to '-c 1000' it works fine. Because I can have more than 1000 concurrent users I would like to fix socket too many open files problem or increase parameter. How to do this and where? I u...

Why would "/id" as a HTTP GET parameter would be a security breach ?

Hello everybody, While trying to debug my openid implementation with Google, which kept returning Apache 406 errors, I in the end discovered that my hosting company does not allow to pass a string containing "/id" as a GET parameter (something like "example.php?anyattribute=%2Fid" once URL encoded). That's rather annoying as Google ope...

How do you set up a cookieless domain on a WHM/Cpanel server?

What's the easiest way to set up a cookieless domain on a WHM/Cpanel server? And please don't answer "Don't set a cookie on your domain then", I want to ensure that even if something on the server tries to set a cookie, it won't work. If this feature is possible anyways... Thank you. ...

Mod_python produces no output

Hi, Just installed and configured mod_python 3.2.8 on a CentOS 5 (Apache 2.2.3) server with Python 2.4.3. It is loaded fine by Apache. I activated the mpinfo test page and it works. So I wrote a simple "Hello World" with the following code: from mod_python import apache def handler(req): req.content_type = 'text/plain' req.wr...

Catch contents of PHP session under Apache with Python (mod_wsgi)?

Hi, Is there a way to catch the contents of the PHP session variable $_SESSION['user_id'] with a mod_wsgi Python script? I'm running a script in the background that will decide whether or not the user may proceed to view the document. I would like to do something like this: def allow_access(environ, host): allow_access = False ...

Which method to use to set up a dynamic port mapper

I have a web app which relies on a number of back end services, and I would like to be able to dynamically switch between different instances of these services. So the thinking was to create an intermediate app which listens on some ports and redirects traffic as required. If I was dealing with pure HTTP I would look at doing this with...

Why I cannot use my apache server?

Hi, I just installed apache server on my local machine. I executed the following command for that: sudo apt-get install apache2 sudo apt-get install php5 sudo apt-get install libapache2-mod-php5 sudo /etc/init.d/apache2 restart However, if I put my test.php file in /var/www and open it with my browser I see nothing (I supposed to see ...

What is a good reference for Server side development?

I am more interested in the design of the code (i.e functional design vs object oriented design). What are the best practices and what is the communities thoughts on this subject? Not that it should matter, but I am working with Apache and Python technology stack. ...

How do I rewrite URLs using htaccess?

How can I rewrite the following URL: http://www.myurl.com/job/Accounting-Clerk-at-Department-of-Workforce-Services-in-Salt-Lake-City,-UT-1b6117567108f5a2 Into these components: query = Accounting Clerk; cmp = Department of Workforce Services; location = Salt Lake City, UT; key = 1b6117567108f5a2; To get this result: index.php?q=$q...

Using Django as a Backend for Cappuccino

I'm new to both Django and Cappuccino. I have a Django site setup and running through Apache via mod_wsgi. I want to use Django as the backend for a Cappuccino application, but a VirtualHost setup in Apache and mod_wsgi to serve a Django application serves static files out of a different location than the normal web root (e.g. http://exa...

Multiple-domains on WAMP localhost

If you're reading my question, thanks, I appreciate your help I'm using Wamp on Windows Vista. I've created 2 project folders: www/project1/ www/project2/ My virtual hosts file looks like this: NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "C:/wamp/www/project1/" ServerName project1.com </VirtualHost> <VirtualHo...

mod rewrite problem?

I am facing a problem using mod_rewrite. This is what I am using Options +FollowSymLinks RewriteEngine on RewriteRule pc/$ /pc.php to rewrite http://www.example.com/pc/ to http://www.example.com/pc.php. This is working perfectly fine but, when I go to a domain such as http://www.example.com/news/today-in-pc/ it is showing the pc.php ...

Web application programming using objective-c?

Just say you have a quite large and complicated desktop application written in objective-c/cocoa written properly in MVC. You then wish to replace the V and C so that it is a web application? Is there anything like Tomcat but for objective c? The closest thing I can think of is somehow convert the Model code into an apache module to lo...

Is the Timeout directive of Apache overrideable in htaccess or inside of a <VirtualHost>?

I want to override the Timeout configuration of apache, only for one domain. I would prefer to be able to offer the option of overriding it in the htaccess, but manually configuring it in the VirtualHost configuration would be fine too. Is this supposed to work? Thanks. ...

fixing an SVN 500 error after editing the .access and .passwd files

Hi guys, I've run into an issue with SVN, and I'm not quite sure how to fix it. Here's the history of what's been done and what the error messaging is, and hopefully we can converge on a fix. Here goes: While away on vacation, another part of my team who didn't really know how to use svn wanted to edit our webpage. He couldn't get the...

phpmyadmin - list files in directory

Hello, I have apache+mysql+phpmyadmnin under Gentoo. phpmyadmin-3.2.2 It worked fine before, but now, when I'm loading http://localhost/phpmyadmin I get a list of flies in phpmyadmin-directory, and when I chose index.php, I get it's own code. What I did wrong? ...

How can I disable RewriteRule for one subcategory?

I have a .htaccess in my root of website that looks like this: RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.mydomain\.pl [NC] RewriteCond %{HTTP_HOST} ^(?:www\.)?([a-z0-9_-]+)\.mydomain\.pl [NC] RewriteRule ^/?$ /index.php?run=places/%1 [L,QSA] RewriteCond %{REQUEST_URI} !^/index.php$ RewriteCond %{REQUEST_URI} !^/images/ Rewrite...

Apache - Redirect 301 pdf to pdf with spaces ( binary file )

What I want: To 301 redirect /file_new.pdf to /file new.pdf ( %20 aka space between file and new ) I'm aware that: I can rely on RewriteRule 301 which uses mod_rewrite, using a solution from this thread: @ http://stackoverflow.com/questions/410811/modrewrite-with-spaces-in-the-urls I can rename the file to not include spaces...

Set-Cookie and Expires headers differ

I'm trying to enable Expires headers for images as recommended by YSlow. I'm sure I had this working before but now when I check YSlow it says they are not being cached. For my .htaccess, I have tried: ExpiresActive on ExpiresDefault A0 <FilesMatch "\.(gif|ico|jpg|png)$"> ExpiresDefault A29030400 Header append Cache-Control "p...

.htaccess redirect www.domain.com to sub.domain.com but only for root?

I have two parts to a site, foo.domain.com and bar.domain.com (with bar.domain.com really being a CNAME to another host) I want users entering www.domain.com to be redirected to bar.domain.com. That is a simple redirect, no problem. However I also want to be able to access subfolders of www.domain.com, is there a way the .htaccess file ...