apache-config

Any python libs for parsing apache config files?

Any python libs for parsing apache config files or if not python anyone aware of such thing in other languages (perl, php, java, c#)? As i'll be able to rewrite them in python. ...

relocate apache's configuration files

Hi, is there a chance to use different location for apache's config files (on Windows)? Other than having to compile it myself and setting the proper #define HTTPD_ROOT value. Thx rezna ...

ETag vs Header Expires

I've looked around but haven't been able to figure out if I should use both an ETag and a Expires Header or one or the other. What I"m trying to do is make sure that my flash files (and other images and what not only get updated when there is a change to those files. I don't want to do anything special like changing the filename or put...

How can I prevent tons of apache processes spawning when I start apache and proceeding to kill my machine?

I have a highly trafficked application on one debian machine and apache has started acting strange. Every time I start apache, tons of apache processes are spawned, the app doesn't load at all, and very quickly the whole machine freezes and must be powercycled to reboot. Here is what I get for top immediately after starting apache: ...

How can I make sure that the urls work the same in built-in web-server and Apache

The situation is: I have Apache with mod_python on windows xp and my django project is not in the document root. The Django project location is defined with the tag. The django.root ist also defined there. All the urls work fine in the built-in server but unfortunately not in Apache. In some urls, especially the ones not pointing to the...

Apache2 - authorize users against a Location using BasicAuth but ONLY for users outside local subnet

In my Apache 2 config I have a VirtualHost which looks something like this: <VirtualHost *:80> ServerName sub.domain.com # username:password sent on to endpoint RequestHeader set Authorization "Basic dXNlcm5hbWU6cGFzc3dvcmQ==" ProxyPass /xyz http://192.168.1.253:8080/endpoint ProxyPassReverse /xyz http://192.168.1.253...

How to redirect different sub domain requests to different servers

Under my domain, one of the subdomain must be directed to one server that hosts the relevant applications, and the rest must be directed to another server that hosts the relavant applications. So, any requests to the url appa.example.com\* must be directed to one server, and any requests to the url appb.example.com\* must be directed to...

Redirection to different port for different sub domain Doesn't Work

I have two sub domains that are located on different ports. www.myexample.com locates on port 83 blog.myexample.com locates on port 82 I have done the following to my Apache configuration file: httpd.conf I incude three conf files, proxyserver.conf, mainhtml.conf and sidehtml.conf The content of proxyserver.conf is NameVirtual...

Apache: how to limit virtual dir to local network

On my Apache 2.x server at home, I have a number of virtual directories. I've set up my router so that I can access Apache from the internet. I need to keep one of those virtual dirs (/private) from being accessed outside my home network LAN. So given /private, how do I configure Apache to only serve requests to /private from 192.168...

Configure Apache to forward dynamic page requests to Tomcat in friendly url scenarios

I have a website with friendly urls. I want all url´s that end with .htm, .gif, .jpg, .css, .js be served directly by the Apache web server and the rest passed on to Tomcat. examples of dynamic url´s that should be forwarded to Tomcat: www.mysite.com/news/newsItem1 www.mysite.com/videos www.mysite.com/news/list.jsp examples of stati...

How can I serve VBS and other file types as plain text from a Subversion repository (Apache)?

I just want to browse my Subversion code repositories and view files. Some of the file types, like .VBS, prompt me to open or save the file, but I just want to view it in the browser as plain text. Can Apache's httpd.conf file be modified to do this? I don't think it would be changed on the client (IE7) because then it would work the ...

Getting Apache to execute command on every page view

Is there any way to get Apache to run a command/program every time a web page is requested? I know I could scan the logs for new entries every minute or so, but can I get Apache to directly call the command? There might be an option like this in one of the configuration files, but if there is I don't know what it is. My server is running...

How do I configure apache - that has not got mod_expires or mod_headers - to send expiry headers?

The webserver hosting my website is not returning last-modified or expiry headers. I would like to rectify this to ensure my web content is cacheable. I don't have access to the apache config files because the site is hosted on a shared environment that I have no control over. I can however make configurations via an .htaccess file....

how to change the default encoding to UTF-8 for server

i am using a hosting company and it will list the files in a directory if an index.html is not there. However, it will use iso-8859-1 as the default encoding. if the server is apache, is there a way to change it to use UTF-8 as a default instead? Update: actually, i found that it is actually using a DOCTYPE of HTML 3.2 and then there ...

how to use "AND", "OR" for RewriteCond on Apache?

Is this how to use AND, OR for RewriteCond on Apache? rewritecond A [or] rewritecond B rewritecond C [or] rewritecond D RewriteRule ... something becomes if ( (A or B) and (C or D) ) rewrite_it. So it seems like "OR" is higher precedence than "AND"? Is there a way to easily tell, like in the (A or B) and (C or D) syntax? ...

Apache Config to send sub dirs to different servers - mod_proxy

We use Apache as a reverse proxy server. This has been working well, but I now need to have http://domain.com/sub1 proxy to serverA and http://domain.com/sub2 proxy to serverB. Is this possible? If so, what is the config for it? Here is my existing config: ... <VirtualHost 555.55.555.555:80> ServerName domain.com DocumentRoot c:/d...

Best way to log POST data in Apache?

Imagine you have a site API that accepts data in the form of GET requests with parameters, or as POST requests (say, with standard url-encoded, &-separated POST data). If you want to log and analyze API calls, the GET requests will be easy, because they will be in the apache log. Is there a simple way to get the POST data in the apache...

How do I run Django and PHP together on one Apache server?

I can currently run either Django through mod_wsgi or PHP on my Apache server. My Django projects run at: http://localhost and source is at C:/django_proj My PHP projects run at: http://php.localhost and source is at C:/web If I turn both on, php.localhost and localhost go to the Django project. I've already set them up through Apache...

Different page provided for Google Crawl

Hi, I have built a Twitter client that's only one page: index.html. When being used, it draws in content from JSON feeds to populate various columns. The issue is hardly any traffic is coming in from Google except for searches on the site's domain name. This is because Google only crawls index.html when it's blank and before the user ent...

Which apache worker to use with passenger and how?

I've this config in my apache2.conf <IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 0 </IfModule> # worker MPM # StartServers: initial number of server processes to start # MaxClients: maximum number of simultaneous client connections #...