apache

.htaccess access control

Hi, I have a directory which contains a htaccess file: AuthType Basic AuthName "Go away" AuthUserFile /home/daniel/.htpasswds/directory1/.htpasswd Require valid-user I have a subdirectory within that folder that I wish to use a different set of usernames/passwords for. How do I negate the effects of the first htaccess so I can use th...

Apache configuration auto-subdomain

I want to create an Apache directive that will be based on a domain (say eli.lh) and that every sub-domain entered (such as test.eli.lh) will be directed to a sub-folder of a predefined directory with the same name as the sub-domain. What I mean: I have /var/projects/ that contains any number of directories inside it, one of them is /v...

php session hijacking - is HTTPS enough? Suggestions for fingerprinting?

I use HTTPS, but want to minimize the risk of someone evil crafting their own cookies with a session ID that someone else actually uses recently. As a session variable I have an expiry time so the session is invalidated if it hasn't been used recently, so I figure the window of opportunity is when the victim is active or recently left...

Django and Apache Issue

I'm trying to get Django and Apache working together using Mod_wsgi and currently I'm getting the following errors: [Thu Jul 15 12:52:38 2010] [error] [client 10.100.50.73] mod_wsgi (pid=4803): Target WSGI script '/home/webdev/websites/virtualenvs/polaris/polaris_project.py' cannot be loaded as Python module. [Thu Jul 15 12:52:38 2010] ...

mod_rewrite with mod_jk, rule works on one server, gives a 404 on another

Hi all. I am using mod_jk and mod_rewrite on httpd 2.2.14. I have a rule.... RewriteCond %{REQUEST_URI} !^/video/play\.xhtml.* RewriteRule ^/video/(.*) /video/play.xhtml?vid=$1 [PT] I just want to rewrite something like /video/videoidhere to /video/play.xhtml?vid=videoidhere This works perfectly on my developer machine, but on produ...

Apache DirectorySlash Off - Site breaks

If i set DirectorySlash Off in my .htaccess file and call the directory without the trailing slash i get an 403-Forbidden from my server. If i call it with slash everything works fine. Could anyone explain why? Here are my fully anonymized .htaccess: # GLOBAL CONFIG Options +FollowSymlinks DirectorySlash Off AddDefaultCharset utf-8 php...

What OS on a Pentium III 550 w/ 512MB RAM Apache/PHP5/MySQL5 Server?

I have spent around 4-5 hours installing and configuring Ubuntu 10.04 (Desktop) on this old computer I have and it seems real sluggish. I thought I would seek some advice here before I invested more of my time. I would like a GUI (for VNC access) but it is not required, and better webpage generation performance. Any reccomendations? ...

Multiple file servers for one website's content.

I'm planning to use multiple file servers to host my website uploaded files. what's the best way to do it ? should I install a web server on other machines as well? or is there any special software for routing files on the network? what would you pros do? Thanks, Taher. ...

.htaccess url rewriting /project/Login to /project/public/index.php/Login without redirecting URL

I have this .htaccess code that works perfectly: <IfModule mod_rewrite.c> RewriteEngine on RewriteRule !\.(js|ico|txt|gif|jpg|png|css)$ public/index.php [QSA,L] </IfModule> ...but this code redirects to public sub directory. I don't know if it's possible to rewrite url without redirecting, just use /project/Login appointing to /pr...

Apache AddHandler: Run ASP code as PHP

I'm running XAMPP. Is there a line I can add to .htaccess or http.conf to make ASP be parsed and handled as PHP pages? I had it setup before but can't remember how to do it. What I've tried so far hasn't worked. Edit: None of these solutions are working, I've tried everything. ...

Problem running Rails/Passenger app on slice that also serves static html sites

I'm running a Rails app on an ubuntu hardy box with passenger. I also have a couple basic html sites running on the same box. My problem is that the apache vhost set up for the html sites seems to be blocking my Rails app from resolving at the proper url. I have a number of Rails apps running on different slices using passenger, so I ...

mod_rewrite: rewrite specific URL

Hello. I want to rewrite a specific URL, I'll show an example so you'll understand what I mean. First, my current rewrite rule: RewriteRule ^/?([a-zA-Z0-9/-]+)/?$ /index.php [NC,L] Now I want this URL: http://example.tld/foobar?test Rewritten to: http://example.tld/foobar Note: only for /foobar?test! E.g. not for /somethingelse?t...

Subversion/Apache/LDAP 401 Authorization Required when using LOCK

Hi, We've set up Subversion to sit behind Apache on a Windows machine and using LDAP. The repository can be browsed, and check ins and check outs seem to work fine. The problem is, our UML tool requires the use of LOCK and we receive 401 errors when attempting to LOCK. We've tried from the command line, Tortoise SVN and the UML tool an...

Samba, Apache and SVN. Getting the permissions right.

I have two machines I work on: Windows Client (Development Machine) Linux Web Server (Ubuntu) On the Linux server I have installed Apache, Samba and SVN. I've created a samba share that maps to the htdocs/ directory so that I can access the web files from Windows. The following illustrates my workflow: From command line on Linux ...

Apache Commons File Upload - Stream ended unexpectedly

Well, I have to say that so far, this one has me stumped. Our web application, which is running in Tomcat 6.0.18 is failing during file upload, but only when the client machine is a windows machine, only for some machines, and for all browsers, not just IE. There is a stack trace in the logs, which seems to indicate that the client eith...

Modrewrite - virtualhost

I've got mydomain.com *.conf folder contains a few .conf files for subdomains and some virtual domains such as myotherdomain.com I want all requests to http mydomain.com to get redirected to https mydomain.com So I have this: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} That works, b...

Apache block an ip address from accessing the website

someone trying to access pages like //mysqladmin//scripts/setup.php Is it some hack attempt or .. ? If yes then how i can block its ip from accessing mine website ? Via htaccess or something else ? ...

php include() from server root?

I'm deploying from my WAMP testing environment to an online test... Locally I had my include paths something like this: include('C/wamp/www...') how do i find the equivalent path on my server? i've tried using '/' to get to the root but i get this error: Warning: require_once(/test123/mvc/views/txt/index_nav_txt.php) [functi...

PHP mail() function does not work on web-host

Hi everyone, I'm having issues sending emails using the php mail() function. I know the php script I have works because I have an identical copy of it on another web-hosting company and it works there. I think it has to do with the web-hosting company itself. Do any of you know what I need to do in order to make it work? Is there some...

Configuring Apache vhost: sites having inner sites. possible?

i am wondering if i am doing some thing wrong i have http://localhost pointing to the directory D:\Projects\Websites then i want to create a inner site http://learningzf in D:\Projects\Websites\php\ZendFramework\LearningZF\public. this is so that i can use URL's like /users/login instead of specifying the full url i find that if i add...