apache

Forcing the www prefix with PHP/htaccess/mod_rewrite

Is there an easy way (preferably with htaccess and mod_rewrite) to force the browser to always access a site with the www. prefix (adding it automatically where necessary?) Thx. ...

How to benchmark apache/nginx setup

I am planning to setup nginx as reverse proxy. I will have apache to deliver my dynamic content, and nginx will deliver the static content. My configuration i have now is just Apache with fastCGI. This gives me no configuration problems and runs great. After I have set up nginx I want to run some benchmarks to see if I really got some ...

What type of websites does memcached speed up

I have read this article about 400% boost of your website. This is done by a combination of nginx and memcached. The how-to part of this website is quite good, but i mis the part where it says to what types of websites this applies. I know nginx is a http engine, I need no explanation for that. I thought memcached had something to do ...

svn working copy issue

Hi guys I have an easy question, but not easy to me. I have a repo in /mnt/apps/repos and I would like to do a hook which will update/export everything to /mnt/apps/dev/repos folder but when running: #/usr/bin/svn update /mnt/apps/dev/repos I am getting error: Skipped '/mnt/webapps/dev/repos' when run #usr/bin/svn export /mnt/a...

How do I disable directory browsing?

I want to disable directory browsing of /galerias folder and all subdirectories Index of /galerias/409 * Parent Directory * i1269372986681.jpg * i1269372986682.jpg * i1269372988680.jpg ...

Site in maintenance. How to redirect visitors?

My PHP site in maintenance. How to redirect visitors to a "site in maintenance" single page? I heard something about app_offline.htm for ASP.NET. Is there something similar for PHP? I want that every page from "mysite.com" be redirected to "maintenance.php"; I don't want to do the minimum modification in the existing site pages, idea...

Returning content directly from memcache - Django / HTTP Server

Hi folks, I've built a web application with Django, I'm using Memcached in order to cache data. A few views cache the whole HttpResponse objects, therefore there might be a better alternative for returning the Memcached data other than going through Django. What could be faster alternatives for returning Memcached data on HTTP Request...

Application error passthru when using apache mod_proxy

Heyas. I'm using mod_proxy with apache2 provide vhost ability to multiple servlet apps running on the local machine. It works fine, for the most part. Requests come into apache then are directed to the application bound on a port on localhost. The app receives the request and responds, which is delivered back to the client by apache....

Django - no module named app

Hi, I have been trying to get an application written in django working - but it is not working at all. I have been working on for some time too - and it is working on dev-server perfectly. But I am unable to put in the production env (apahce). My project name is apstat and the app name is basic. I try to access it as following B...

mod_cgi , mod_fastcgi, mod_scgi , mod_wsgi, mod_python, FLUP. I don't know how many more. what is mod_php equivalent?

I recently learnt Python. I liked it. I just wanted to use it for web development. This thought caused all the troubles. But I like these troubles :) Coming from PHP world where there is only one way standardized. I expected the same and searched for python & apache. http://stackoverflow.com/questions/449055/setting-up-python-on-window...

Setting user agent in Java httpclient and allow redirects to true

Hey guys - I am trying to set my user agent string in the HttpClient apache object in Java but I cannot find out how to do it. Please help! Also I am trying to enable redirects to true but also cannot find this option within the HttpClient object. Thanks Andy ...

file_get_contents not working

I am trying to read a file in with file_get_contents () - it's a remote HTTP file, and I've checked the URL and it's fine. Only it doesn't work. More to the point the the error message is the standard Firefox server error: The connection was reset The connection to the server was reset while the page was loading. ... rathe...

CoreDumpDirectory isn't working on ubuntu; getting segmentation fault with php

I'm trying to solve a segmentation fault. This message appears in my apache-error.log: [notice] child pid 3979 exit signal Segmentation fault (11) I've tried disabling some apache and php modules but I'm still getting the same error. I've also tried putting this in apache2.conf: CoreDumpDirectory /tmp/apache2-gdb-dump and ...

Authentication and Login on 2 website

Hi at all, I have 2 site: example.com and exampletwo.com I want that when a user login on example.com then he is automatically authenticated also on exampletwo.com How can I do that ? I use Django + Nginx on first website and Tornado framework + Tornado server on second website. Thanks ;) . P.S. If you don't know this platforms ( Dj...

Troubles configuring SSL for an Apache host

I configured it on Friday night and all worked well. Today for some reason it stopped working and I can't figure out why. When you goto the secure page it's acting like I have a self-signed certificate and I don't. I have the host configured like so <VirtualHost *:443> ServerAdmin [email protected] DocumentRoot "/path/to/s...

Debugging mod_rewrite

I'm playing around with Apache's mod_rewrite module, and want to know if there is a decent way to output some debugging information? For example, the documentation lists a number of variables available: %{HTTP_USER_AGENT}, %{HTTP_REFERER}, %{HTTP_COOKIE} ... etc Is there a way I could output these just to see what I'm working with? I ...

compile opensll with the 'shared' option

On CentOS 5.4, OpenSSL compiles fine without 'shared' option. But when I passed that option the compilation fails with: /usr/bin/ld: libcrypto.a(x86_64-gcc.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC When I try: ./config shared CFLAGS=-fPIC that doesn't work. ...

Is it possible to stream a file to and from servers without holding the data in ram?

Hi everyone! PHP question (new to PHP after 10 years of Perl, arrggghhh!). I have a 100mb file that I want to send to another server. I have managed to read the file in and "post" it without curl (cannot use curl for this app). Everything is working fine on smaller files. However, with the larger files, PHP complains about not being...

how do i reach apache on a vitualbox machine

I am trying to run a virtual LAMP machine on my windows 7 for dev purposes. But i cant figure out how to reach the apache from the host windows 7 system. I did an ifconfig and tried the ipaddress, but to no avail. ...

PHP: Best solution for links breaking in a mod_rewrite app

I'm using mod rewrite to redirect all requests targeting non-existent files/directories to index.php?url=* This is surely the most common thing you do with mod_rewrite yet I have a problem: Naturally, if the page url is "mydomain.com/blog/view/1", the browser will look for images, stylesheets and relative links in the "virtual" directo...