apache2

remove http auth for a specific query-string...

Hi I'm trying to achieve something like this: .htaccess: AuthType Basic AuthName "My secure page" AuthUserFile .passwords Require valid-user <Location "index.php?id=62"> Allow from all Satisfy any </Location> So the entire application should be "secured" using http basic auth, except one specific request. Is there any smart way to r...

How to configure reverse proxy/loadbalancer for custom routing

Hi! Suppose I have 3 webservers behind a reverse proxy/loadbalancer. Currently I use Apache 2 but don't mind switching. Those webservers are not equal. They have different sets of local data meaning that different kinds of requests will be handled more efficiently on specific webserver. I want to plug some custom routing logic into m...

getting error in starting apache2

hi all I am new to apache2 and i have installed apache2 on my ubuntu machine and edited apache2.conf file wrongly .and when i am trying to start it I am getting an error massage like this: * Starting web server apache2 apache2: Syntax error on line 236 of /etc/apache2/apache2.conf: Syntax...

url redirection/mapping of the same java web application to multiple sub-domains

Hi, I've a domain, say www.domain.com. And I've developed a java web application, say jwa. Now I want to install the same app for different clients using subdomains, what is the best solution possible? something like "client1.domain.com" points to "client1" (renamed jwa) I know we can get client1.domain.com/client1/ but client1 twice ...

How can I run a long background process from a Perl CGI program?

I have a problem with a long running CGI and the timeout error: Timeout waiting for output from CGI script The client side is a form programmed in jQuery. The user input some data and receives a message that the analyses has been launch. The user don't expect to see receive more messages except an email with a link when the data h...

Running the django admin over https using apache2

I have a django web application that's running on apache 2.2.14 and I want to run the admin application over https. Having read considerable discussions on using a proxy, writing middleware, running alternative wsgi scripts, the chaps in #httpd came to my rescue. The solution is so simple, I was surprised I didn't find it online, so ...

Configure apache to listen on port other than 80

I want to configure apache to listen on port 8079 I added LISTEN 8079 directive in httpd.conf I opened 8079 port in iptables / restarted iptables etc. I even stopped iptables service. "netstat -nal | grep 8079" shows "tcp 0 0 :::8079 :::* LISTEN" Now, if I try to access http://localhost:8079 or http://myserver.com:8079 from that machin...

Help with URL rewriting using .htaccess

I have html static files on my server. I want the access rules as - If user visits http://example.com/test/ he should get the contents of the file http://example.com/test.html If the user visits http://example.com/test (without the trailing slash), he gets redirected to http://example.com/test/ (which runs rule 1 and gets him the conte...

RewriteRule is redirecting rather than rewriting

I have a rewrite rule that looks like this: RewriteEngine On RewriteRule ^$ store [L] That's the only thing in the .htaccess file. It's supposed to allow someone to go to http://www.site.com/ and according to the server, they're accessing http://www.site.com/store . But it's redirecting the user. In other words, you see "/store" in...

apache says my DocumentRoot directory doesn't exist

I am using Phusion Passenger to deploy a rails application using apache2 on CentOS 5.5. For some reason, I keep getting this message when I start up apache: > service start httpd Starting httpd: Warning: DocumentRoot [/home/deploy/my_app/public] does not exist [ OK ] The directory most certainly does exist. Here are some important ...

Configuring authentication and authorization in Apache2 with MySQL

Hello, I am trying to configure Apache2 so I can use MySQL for authenticating users to access certain pages. Also authorization needs to work so different groups can reach differen pages. Now, I have googled a lot but can't find out how to do this. At least not for the configuration I am having. There doesn't seem to be any version of...

Zend .htaccess configuration not working in Ubuntu

Hi I am running Ubuntu 10.04 LTS - the Lucid Lynx i create a project by zf create project test this command automatically generates a .htaccess file which didn't work I configured my webserver (Apache2) by editing /etc/apache2/sites-available/default file setting <Directory /var/www/> Options Indexes FollowSymLinks MultiViews All...

mod_rewrite - redirecting to several different PHP files

I want any request to /files/ to be redirected to one php script, and all others (that aren't for specific file types) to be directed to another. No matter what I try I can't get this to work. This is from my apache2 virtual server config file: <Directory /var/www/test/public> RewriteEngine On RewriteBase /files RewriteRule ~files/(.+)...

How to display language syntax coloring with the DAV SVN module?

When viewing a plain text code file (i.e. ".py", ".c", ".cpp", ".m", ".as", ".js", etc.) is it possible to have the DAV SVN module render language-specific syntax coloring? That would be amazing. Currently it's all just black plain text, but it'd great to get this working so it's easier to read code in the browser, for those folks here...

Possible to 301 redirect using apache mod_rewrite to url with scheme that is not "http" and "https"?

Trying to do a 301 redirect using apache mod_rewrite: RewriteRule /the-path/(.*) my-scheme://new-site.com/the-path/$1 [R=301,NC,L] The path http://site.com/the-path/param1=xyz will redirect to http://site.com/my-scheme://new-site.com/the-path/param1-xyz But when I use "http" or "https" in place of "my-scheme" in the rewrite rule, i...

How to fix the directory that shows me a "forbidden" message when i open it in the browser?

I was using a hosting to run my site, lately it has been working fine but today i opened the site in the browser at "http://www.arquisanjose.org/ver2" and shows me the following message: i´ll appreciate some of your help... ...

Building mod_helloworld.lpr

Im trying to build the apache example of the mod_helloworld.lpr, C:\lazarus\components\fpweb\demo\helloworld\apache Lazarus 0.9.29 FPC Verion 2.4.3 SVN 27129 i386-win32 After Adding $(LazarusDir)\fpc\2.4.3\source\packages\fcl-web\src\ to the Other Unit Files (-Fu) it will compile, but when i build/link i get the errors mod...

Apache - Self assigned SSL Help

Hi, How would I self assign a SSL Cert on Apache (XAMPP) on a Windows 2003 server? I have researched and the farest I got was a broken SSL Cert with "Common name" problem. Post your guide or links here, Thanks. ...

How to get HTML files to find their dependencies' file paths using WebSVN?

I set up DAV SVN recently with svn:mime-type set to "text/html" on my HTML files, which allows me to see the HTML file rendered normally in the browser, instead of plain text. However, I switched to WebSVN so I could get syntax-highlighting on my code files, and now the HTML files are not able to locate their dependencies - js, css, etc...

How can I turn off QSA? (query string append)

I'm using Apache2 and mod_rewrite to hide my query strings. These are the rules in question. RewriteCond %{QUERY_STRING} ^query=(.*)$ RewriteRule (.*) /search/%1 [R=301,L] RewriteRule ^search\/?$ /search/?query=test [R=301,L] When I visit /search (or /searc...