apache-config

Apache Port Proxy

瘦欲@ 提交于 2019-11-30 10:48:24
问题 I have a non-Apache server listening to port 8001 and Apache listening port 80. I want a certain virtual domain to actually be served by the non-Apache server over port 80. Example: <VirtualHost *:80> Servername example.com # Forward this on to the server on port 8001 </VirtualHost> I thought I could do this with mod_proxy and ProxyPass with something like this. ProxyPass * http://www.example.com:8001/ But that doesn't work. 回答1: ProxyPass * http://www.example.com:8001/ star is only valid in

How to check mod_headers and mod_expires modules enabled in apache

北慕城南 提交于 2019-11-30 03:44:35
I want to check whether mod_headers and mod_expires modules enabled or not in my server Is there a way available to list apache enabled/disabled modules using some php function just like we list php information with phpinfo(); function? speeves On Debian: user@machine:~$ /usr/sbin/apache2 -l Most GNU/Linux distros: user@machine:~$ /usr/sbin/httpd -l Ubuntu: user@machine:~$ ls /etc/apache2/mods-enabled On Mac OSX: user@mymac:~$ httpd -l On Win 7 (64-bit): C:\Users\myuser>"\Program Files (x86)\Apache Software Foundation\Apache2.2\bin\httpd.exe" -l Try these commands from a terminal window in all

Django with mod_wsgi returns 403 error

荒凉一梦 提交于 2019-11-29 15:21:03
I am trying to use Django with Apache (and mod_wsgi). With the default Django webserver everything was going well, but now I get 403 (access forbidden) error when trying to load the page. I searched previous posts here and read official docs but the solutions there weren't helpful. Here are the lines from my httpd.conf: WSGIScriptAlias / /home/karlis/django/apache/django.wsgi <Directory /home/karlis/django/apache> Order allow,deny Allow from all </Directory> Alias /media/ /home/karlis/django/media <Directory /home/karlis/django/media> Order deny,allow Allow from all </Directory> Permissions

Any python libs for parsing apache config files?

扶醉桌前 提交于 2019-11-29 03:31:20
问题 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. 回答1: I did find an interesting Apache Config parser for python here: http://www.poldylicious.de/node/25 The Apache Config Parser mentioned is not documented, but it does work. 回答2: Red Hat's Emerging Technologies group has Augeas (written in C, but with Python bindings available), a generic system configuration tool

apache commons configuration loads property until “,” character

时间秒杀一切 提交于 2019-11-29 03:28:37
I want to load configuration (apache commons configuration) from a properties file. My program is: PropertiesConfiguration pc = new PropertiesConfiguration("my.properties"); System.out.println(pc.getString("myValue")); In my.properties I have myValue=value, with comma When I run program the output is value , not value, with comma . Looks like value is loaded until , character. Any ideas? Check Javadoc . You have to setDelimiterParsingDisabled(true) to disable parsing list of properties. That behavior is clearly documented , i.e., that PropertiesConfiguration treats a value with a comma as

How to check mod_headers and mod_expires modules enabled in apache

独自空忆成欢 提交于 2019-11-29 00:45:06
问题 I want to check whether mod_headers and mod_expires modules enabled or not in my server Is there a way available to list apache enabled/disabled modules using some php function just like we list php information with phpinfo(); function? 回答1: On Debian: user@machine:~$ /usr/sbin/apache2 -l Most GNU/Linux distros: user@machine:~$ /usr/sbin/httpd -l Ubuntu: user@machine:~$ ls /etc/apache2/mods-enabled On Mac OSX: user@mymac:~$ httpd -l On Win 7 (64-bit): C:\Users\myuser>"\Program Files (x86)

how to use “AND”, “OR” for RewriteCond on Apache?

家住魔仙堡 提交于 2019-11-28 15:50:49
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? Sjon This is an interesting question and since it isn't explained very explicitly in the documentation I'll answer this by going through the sourcecode of mod_rewrite ; demonstrating a big benefit of open-source . In the top section you'll quickly spot the defines used to

apache commons configuration loads property until “,” character

巧了我就是萌 提交于 2019-11-27 17:36:40
问题 I want to load configuration (apache commons configuration) from a properties file. My program is: PropertiesConfiguration pc = new PropertiesConfiguration("my.properties"); System.out.println(pc.getString("myValue")); In my.properties I have myValue=value, with comma When I run program the output is value , not value, with comma . Looks like value is loaded until , character. Any ideas? 回答1: Check Javadoc. You have to setDelimiterParsingDisabled(true) to disable parsing list of properties.

Django (wsgi) and Wordpress coexisting in Apache virtualhost

最后都变了- 提交于 2019-11-27 13:50:10
I have a Django project that I need mounted at two different subdirectories of my url, and I need Wordpress running at /. So: *.example.com - WordPress *.example.com/studio - django *.example.com/accounts - django Here's the httpd.conf that I have so far: <VirtualHost *:80> ServerName wildcard.localhost ServerAlias *.localhost AddType application/x-httpd-php .php DocumentRoot /var/empty Alias /site_media/ /home/zach/projects/python/myproject/static/ Alias /media/ /home/zach/projects/python/myproject/env/lib/python2.6/site-packages/django/contrib/admin/media/ Alias / /home/zach/projects/python

How do I configure Apache2 to allow multiple simultaneous connections from same IP address?

风格不统一 提交于 2019-11-27 13:34:55
By default, Apache2 seems to allow only 1 connection per IP address. How do I configure Apache2 to allow multiple simultaneous connections from the same IP address? Here is my situation: a web app being hosted on a server. a remote client makes an request that may take 15 seconds to complete. the same remote client makes another (independent) request. at present, the 2nd request sits in a queue until the 1st request completes, since Apache2 seems to impose a limit of 1 connection per IP address. How do I override this default behaviour and allow the 2nd request to be processed in parallel?