apache-config

Run both Django and PHP application in Apache

匆匆过客 提交于 2021-02-18 18:00:34
问题 I'm trying to host Django and PHP(wordpress) app in Apache domain.com, should point to Django app domain.com/wp, should point to wordpress app Here is my 000-default.conf in /etc/apache2/sites-available <VirtualHost *:80> DocumentRoot "/var/www/html/wp" ServerName domain.com/wp Alias /wp /var/www/html/wp <Directory /var/www/html/wp> Options Indexes FollowSymLinks AllowOverride None Order Deny,Allow Allow from all </Directory> </VirtualHost> <VirtualHost *:80> Alias /static /var/www/html

PHPIniDir broken under windows 7?

耗尽温柔 提交于 2020-06-13 19:43:22
问题 I had a server running on a Windows XP machine using Apache2 with PHP and MySQL. I've recently upgraded to Windows 7 and have been having trouble getting it to work. Apache works fine and PHP works, but I can't seem to get it to work with a php.ini file. When I set PHPIniDir to a directory with a php.ini file, the Apache service does NOT start. When I set PHPIniDir to a directory with NO php.ini file, the Apache service does start. When I leave out PHPIniDir , the Apache service does not

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

独自空忆成欢 提交于 2020-01-15 07:04:09
问题 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. The server - apache 1.3 - is not configured with mod_expires or mod_headers and the company will not install these for me. With these limitations in mind, what

Apache: Redirect domain to other domain with appended querystring

眉间皱痕 提交于 2020-01-07 05:00:37
问题 I want example.se to redirect to example.com?lang=swe It works fine with this apache config: <VirtualHost *:80> ServerName example.se ServerAlias *.example.se Redirect permanent / http://example.com/?lang=swe </VirtualHost> The problem is that this breaks if there is something else after the domain, ex: example.se/page1 should redirect to example.com/page1?lang=1 but with the setup above it redirects to example.com?lang=swepage1. Is there a way to do this right? 回答1: I believe it should be

Apache ErrorDocument with absolute path

こ雲淡風輕ζ 提交于 2020-01-02 04:07:08
问题 I have a server with several virtual hosts. Now I want to set up the error documents for the whole server. I have located my error sites in /var/www/error/*, but with the ErrorDocument Directive I am only able to set the error document relative to document root, but I want to use the absolute path (e.g /var/www/error/404.html). Has anyone an idea how I can get this? 回答1: I don't think this can be done directly inside the statement: The ErrorDocument will always have to be relative to the

Virtual host on ubuntu 13.10 and apache 2.4.6

大兔子大兔子 提交于 2019-12-31 08:05:12
问题 I have the following problem My hosts file is as follows: 127.0.0.1 localhost 127.0.1.1 barbala4o-HP-ProBook-4530s 127.0.1.1 mysite.localhost My file in the /etc/apache2/sites-available/mysite.localhost.conf is as follows : <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName mysite.localhost DocumentRoot /var/www/mysite <Directory /var/www/mysite/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> ErrorLog /var/log/apache2/mysite-error.log CustomLog

Allow anonymous access to parts of a secured Subversion repository

和自甴很熟 提交于 2019-12-24 02:47:09
问题 We face currently the problem to allow people access to parts of a subversion repository (1.5.x, soon 1.6.x), that is secure in other parts. Let me give you some details: We have a production server where a lot of projects have their own subversion repository. For each of the projects, there exists a section in our Apache config that looks like that: DAV svn SVNPath /export/subversion/PROJ1 SVNAutoversioning on #Authentication AuthType Basic AuthName "Subversion PROJ1" AuthBasicProvider ldap

Get a 404 Error when clone, pull mercurial repository

别来无恙 提交于 2019-12-22 06:49:46
问题 I have a repository in here http://repos.joomlaguruteam.com/ I using hgweb.cgi this is my hgweb.config file [web] baseurl = #allowpull = true allow_push = * push_ssl = false allow_archive = bz2 gz zip [paths] / = /home/repos/* I can browse it but I can't clone it. Every time I clone it I have this error hg clone http://repos.joomlaguruteam.com/hello destination directory: hello requesting all changes abort: HTTP Error 404: Not Found and the access log have that 115.5.95.59 - - [10/Feb/2011:04

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

故事扮演 提交于 2019-12-22 01:36:36
问题 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:8080/endpoint <Location /xyz> # This needs to let users through under the following circumstances # * They are in 192.168.1.0/24 # * They have a valid user in a htpasswd file #

Is it possible to use variables in httpd.conf

假如想象 提交于 2019-12-20 11:06:18
问题 Is there a way to use variables of some sort in an apache httpd.conf file? I'd like to define a value and use it throughout a block, as in define myvar somename #or whatever the syntax would be alias /my/path "/some/path/${myvar} #or whatever the syntax would be 回答1: Yes, kind of. You can get environment variables substituted in to the config file at start up with the ${ENVVAR} syntax. It's up to you to figure out how to set those variables before starting up the server. http://httpd.apache