Articles of apache 2.4

选项+/-与全部相互作用,这在2.2中是默认的,但在2.4中不是默认的

我有一系列从2.0 / 2.2升级到2.4的服务器。 以前的pipe理员做了各种选项的散列。 我很困惑,因为2.0 / 2.2文档说选项全部(这是“除MultiViews外的所有”)是默认的,而在2.4中默认已经改变为FollowSymLinks。 我也困惑父目录的选项与子目录的选项有什么关系 – 什么是inheritance? 这是我的问题小孩… <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all </Directory> <Directory "/opt/apache/netegrity/webagent/pw/"> Options -Indexes MultiViews ExecCGI AllowOverride None Order allow,deny Allow from all </Directory> 好的,这是2.2,在那里的文档肯定骂你在同一行+/- +/-非+/-选项,但启动您的服务器。 那么在这个代码中为/ opt / apache / netegrity / webagent / pw /设置了哪些选项? pw目录是否inheritance了FollowSymLinks并设置了MultiViews和ExecCGI,并且-Indexes是无稽之谈,因为Indexes不是反正呢? 如果第二个选项指令是唯一的 Options MultiViews ExecCGI […]

Passenger修改了我的应用在启动时使用的NODE_PATH

我使用Node.js应用程序在Apache服务器(运行Ubuntu 16.04的数字海洋液滴)上实现Passenger。 Webpack成功地build立了静态的.js文件,并且Node成功地运行了启动。 但是,从浏览器访问该网站时,出现Cannot find module 'app/path/to/file' 。 我的应用程序使用NODE_PATH环境variables将应用程序源设置为./src因此在导入语句中,我不必将path设置为src/app/path/to/file ,而只是将app/path/to/file 。 但是,Passenger正在修改NODE_PATHvariables,并且在发出页面请求时,Node会使Passenger崩溃,因为NODE_PATH不再设置为./src (但是,在Node启动和Webpack构build期间, NODE_PATH=./src是因为Passenger不参与这些过程)。 所以我的问题是,什么是设置NODE_PATH=./src但仍然保持相同的效果(即src/app/path/to/file => app/path/to/file )的替代方法。

Apache:为每个虚拟主机添加自定义的tmp-Dir

我需要更改现有的虚拟主机configuration文件。 我的目标是添加一个自定义的tmp-path到每个主机configuration,存储在/configs 。 也许可以在每个vHost-config中包含一个额外的configuration文件,允许使用某种placeholder在全局范围内进行设置? 就像是 include /configs/_additional.values 在每个vHostconfiguration和类似的东西 upload_tmp_dir /var/www/vhosts/$username/.tmp 在这个额外的configuration。 也许你在那里有一个想法?

别名主机名和文件path

是否有可能掩盖主机名与别名和variables? 例如: 我想调用http:// easyNameToRemember / path / to / file 代替: HTTP:// uglyServerName:8000 /的/真正/path/到/文件 基本上,“easyNameToRemember”将保存服务器名称,端口和静态APIpath。

Apache仅使用SSL的多个域名1

我有一个VPS与Apache2工作。 我的问题是,我有2个项目: 1. example.com 2. admin.example.com 我有一个SSL证书(只适用于)example.com我的问题是,当我访问admin.example.com,Web服务器正在为我的主项目(如我访问example.com)。 同样的问题,如果我通过IP访问。 我有2个虚拟主机可configuration。 我正在使用.htaccess文件redirect到https 我的example.com conf文件: <VirtualHost example.com:80> ServerAdmin [email protected] ServerName example.com ServerAlias www.example.com DocumentRoot "/var/www/example.com/public" ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> <IfModule mod_ssl.c> <VirtualHost example.com:443> ServerAdmin [email protected] ServerName example.com ServerAlias www.example.com DocumentRoot "/var/www/example.com/public" SSLEngine on SSLCertificateFile /etc/ssl/example.com/example.com.crt SSLCertificateChainFile /etc/ssl/example.com/example.com.intermediate.ca SSLCertificateKeyFile /etc/ssl/example.com/example.com.key </VirtualHost> </IfModule> 在这里input图像说明 我的admin.example.com conf文件 <VirtualHost admin.example.com:80> […]

如何在Windows Server 2012 R2 Standard 64位上configuration端口转发链接到apache

我已经在Windows Server 2012 R2 Standard 64位系统上安装了apache2。 我可以在本地打开浏览器浏览器并访问http:// localhost上的服务器。 我问客户端的服务器的公共IP。 客户端给我一个端口转发链接为http:// xxxx ****。dyndns.org:33808/这是404目前。 我被困在如何链接这个端口转发的链接到Apache服务器

Apache忽略.htaccess

Apache忽略我的.htaccess文件。 我已经读了或多或less关于这个问题的每一个线索,我可以find并尝试所有的解决scheme,没有任何工作。 我已经尝试过不止一次。 设置 VPS上的Ubuntu 16.04.1 LTS(GNU / Linux 4.4.0-57-generic x86_64) Apache / 2.4.18(Ubuntu) Django 1.10通过WSGI Python 3.5在virtualenv 我想提供一些文件,只能通过批准的IP范围或用户login。 我有一个.htaccess文件,我以前曾经在一个基于php的网站的虚拟主机上使用,现在我想让它在一个基于Django的网站上使用VPS。 以下目录的名称已被更改,但应忠实于设置。 文件的位置 .htaccess文件里面的/dir在一个子目录中, /dir/1/2/3 1/2/3。 我希望它将设置应用于该子目录中的每个子目录,例如/dir/1/2/3/a 1/2/3 /dir/1/2/3/a , /dir/1/2/3/b , /dir/1/2/3/c 。 这些目录具有应该被保护访问的文件(例如/dir/1/2/3/a/file.pdf )。这应该通过.htaccess来完成,而不是服务器范围的设置,因为可接受的IP列表非常长,我宁愿没有它膨胀我的Apacheconfiguration文件。 .htaccess文件 大部分内容是出于隐私原因编辑的,但是它遵循这个模板。 # initial deny <Limit GET POST> order deny,allow deny from all # SUBSCRIBER LIST #a very long list […]

PHP70-FPM错误:无法读取孩子说:错误的文件描述符(9)

我一直在我的php-fpm日志中收到以下错误。 我已阅读并尝试了一些类似的问题在serverfault.com上可用但问题没有解决。 [11-Apr-2017 08:33:27] ERROR: unable to read what child say: Bad file descriptor (9) [11-Apr-2017 09:49:26] ERROR: unable to read what child say: Bad file descriptor (9) [11-Apr-2017 09:49:26] ERROR: unable to read what child say: Bad file descriptor (9) [11-Apr-2017 09:56:11] ERROR: unable to read what child say: Bad file descriptor (9) [11-Apr-2017 […]

apache 2.4 proxyerroroverride为自定义503,但不是404

我们有一个tomcat应用程序,它有一个很好的格式和function的404页面。 我们使用Apache 2.2作为前端,并使用这两个代码的ErrorDocument指令覆盖502和503错误条件的错误页面。 为了得到这个工作,我们必须包含ProxyErrorOverride On指令。 当我们升级到Apache 2.4时,我们开始获得一个标准的Apache 404页面(因为我们没有提供404代码的ErrorDocument指令)。 注释掉ProxyErrorOverride指令,我们得到了tomcat应用程序的404内容。 当然,我们也可以获得标准的502和503页面,而不是我们想要的自定义响应。 我们如何获得我们的自定义502和503页面而不丢失应用程序的404?

AWS Elastic Beanstalk – Apache正在不断重启

我已经在AWS Elastic Beanstalk上部署了一个Django应用程序。 最近我遇到了Apache的问题,因为它经常重启。 查看我的Elastic Beanstalk仪表板 最初看文件/ var / log / httpd / error_log我得到以下错误: [Wed Apr 12 08:50:51.371533 2017] [mpm_prefork:error] [pid 17847] AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting 所以我configurationApache如下: # KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to "Off" to deactivate. KeepAlive […]