Articles of apache 2.4

作为Apache前面的反向代理的NGINX在SSL打开时不起作用

我已经阅读了每一篇文章,教程和论坛的评论,对于我来说,一旦SSL使用Nginx服务器模块,我仍然无法让Nginx代理正常工作。 对于常规和ssl访问,Apache完全使用虚拟主机进行设置。 Apache正在使用ports.conf监听端口8081,如下所示: NameVirtualHost *:8081 Listen 8081 <IfModule ssl_module> Listen 443 </IfModule> <IfModule mod_gnutls.c> Listen 443 </IfModule> 我的SSL apache虚拟主机如下所示: 打开nginx并将ssl设置注释掉(见下面的configuration),一切正常,因为我能够正确访问SSL和非SSL版本的站点。 server { listen 80; # listen 443 ssl; server_name foobar.net; # ssl on; # ssl_certificate /etc/letsencrypt/live/foobar.net/fullchain.pem; # ssl_certificate_key /etc/letsencrypt/live/foobar.net/privkey.pem; location / { proxy_pass http://104.236.224.53:8081; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto […]

000-default.conf虚拟主机文件是全局的吗?

我只需要清除与000-default.conf文件混淆。 我正在按照教程,当它开始谈论默认的虚拟主机文件,它只提到“默认”,而不是000-default.conf“,我想这是默认的虚拟主机文件的新名称? 无论如何,我只是想问一下,如果将000-default.conf文件用作全局虚拟主机文件,那么如果我在那里设置不列出目录或closures版本信息,这将被应用于所有其他虚拟主机? 而且我应该这样做还是那种不好的做法,000-default.conf的主要目的是什么?

Apache – mod_perl:未知Authz提供者'访问'

我正在尝试在新的Linux环境中设置并运行一个旧的Web应用程序(编写于2010年)。 Apache服务器由于Unknown Authz provider access错误而未启动,这是由下面给出的configuration引起的。 <Directory /srv/webapp> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch SetOutputFilter DEFLATE ExpiresActive On ExpiresDefault "3 Months" AuthType security::AuthCookieHandler AuthName Maxio PerlAuthenHandler security::AuthCookieHandler->authenticate PerlAuthzHandler security::AuthCookieHandler->authorize require access </Directory> 我找不到任何文档,或者任何定义access apache模块,但是security::AuthCookieHandler有 sub access { … … } 我明白,这是基于mod_perl的身份validation,但没有在此之前。 如果此身份validation被禁用,并且该应用程序在浏览器中加载,则Apache将启动。 所以问题是 是否require access应该从sub access获取返回值? 如果是这样,为什么sub accessconfiguration不可见? 如果不是这样,那么access是什么?

Apache似乎并不指向虚拟主机,从错误的文档根目录提供文件

我试图解决一个工作正常的Apache实例,直到上周重新启动。 它现在看起来好像虚拟主机没有被加载,我不明白为什么。 任何尝试访问应该转发到虚拟主机的文档根目录的app.domain.com实际上都指向主服务器的文档根目录。 httpd.conf在下面(有一些小的混淆) ServerRoot "/etc/httpd" Listen 80 Include conf.modules.d/*.conf User web-user Group web-group ServerAdmin [email protected] DocumentRoot "/var/www/html" <Directory /> AllowOverride all Require all denied </Directory> <Directory "/var/www"> #Previous value none AllowOverride none # Allow open access: Require all granted </Directory> # Further relax access to the default document root: <Directory "/var/www/html"> Options Indexes FollowSymLinks […]

加载相对资源的apache别名页面

我正尝试别名path到特定的文件 我试过了: Alias /Console "/console/console.html" 现在去http://example.com/Console确实带来了console.html 。 但从console.html (即, images\1.jpg )引用的任何相对资源失败,因为它似乎去到document_root 我究竟做错了什么?

由Chrome占用的Windows上的Apache保持活跃状态

Chromes keep-alive数据包似乎阻止了Apache响应来自其他客户端的所有请求。 它们不会出现在访问日志中,也不会出现在mod_status中,浏览器一直在等待答案。 无论在Apache中保持活动状态是否启用,都会发生这种情况。 这只发生在客户端在另一个networking上时,这似乎与Chromefunction有关,以使连接保持在NAT网关/防火墙后面。 从服务器机器上的浏览器,我总是可以访问Apache上的页面,即使第二个networking上的客户端被阻塞。 在这个Wireshark屏幕上,您可以看到Chrome阻止请求时发生在服务器上的示例: 当我closuresChrome实例时,Apache恢复应答之前收到的请求,并且这些请求出现在访问日志中。 当我在Chrome中刷新页面时,有时也会回答其他请求。 这是一个Apache错误或configuration错误? 或者可以由networkingconfiguration引起? 服务器: Apache:2.4.20 x64 VC14 PHP:7.0.5 TS x64 VC14 Windows Server 2012 R2

nginx + apache2代理传递,mod_perl不工作

我试图让mod_perl在Apache / 2.4.18(Ubuntu)上工作 。 这是我在Apache2中的主要域configuration文件: <Virtualhost 0.0.0.0:8181> ServerName test DocumentRoot /srv/www/test.pro/www ErrorLog /srv/www/test.pro/logs/error.log <Directory "/srv/www/test.pro/www"> Options MultiViews FollowSymLinks AllowOverride all Require all granted </Directory> ScriptAlias /cgi-bin /srv/www/test.pro/www/cgi-bin <Directory "/srv/www/test.pro/www/cgi-bin"> AddHandler cgi-script .cgi AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Require all granted SetHandler cgi-script </Directory> <Location /> LimitRequestBody 5242880 </Location> </VirtualHost> 这段代码可以工作,但不是用mod_perl。 所以,我正在做以下启用mod_perl : <Virtualhost 0.0.0.0:8181> […]

在Apache Windows Server 2012 R2上安装SSL证书

我是一名开发人员。 我们的服务器pipe理员给了我3个文件。 .cer,.pfx和.p7b,并告诉我在Apache服务器上安装SSL。 我有AWAMP与Apache版本2.4.9。 我有search,find了一些东西。 我打开httpd.conf文件并searchDocumentRoot。 DocumentRoot之后,我添加了, DocumentRoot "c:/wamp/www/" SSLEngine on SSLCertificateFile C:/Path/MyCer.cer SSLCertificateKeyFile C:/Path/MyPfx.pfx SSLCACertificateFile C:/Path/MyP7b.p7b 现在,当我重新启动Apache。 即使在http上,我也无法浏览服务器。 当我评论上述行时,我的网站在http上工作。

奇怪的错误与CentOS 7上的Apache

我正在尝试使用vagrant,virtualbox和CentOS 7 64bit构build虚拟机。 主机操作系统是Ubuntu 14.04 64bit。 Vagrant是1.9.2,VirtualBox 5.1.6。 这是stream浪文件 Vagrant.configure("2") do |config| config.vm.box = "centos/7" config.vm.box_check_update = false # Enable cache if plugin is installed # To install it execute: vagrant plugin install vagrant-cachier # cache will be located in [thisvagrantdir]/.vagrant/machines/default/cache if Vagrant.has_plugin?("vagrant-cachier") config.cache.auto_detect = true config.cache.scope = :machine end config.vm.network "private_network", ip: "192.168.33.101" config.hostmanager.enabled […]

将.htaccess转换为nginx。 重写不应该如此

我无法将.htaccess转换为nginxconfiguration。 我一直在尝试使用在线转换工具。 .htaccess转换如下: RewriteEngine on RewriteCond %{REQUEST_URI} !/public RewriteCond %{REQUEST_URI} !/index.php RewriteRule ^(.*)$ index.php/?params=$1 [NC] 我一直在尝试使用下面的nginxconfiguration: location / { rewrite ^(.*)$ index.php/?params=$1; } 这只是不正常的工作。 它也允许访问这个目录中的其他文件。 我只想要index.php可用。 甚至需要使用.htaccess规则。 在生产服务器上不能安装apache / httpd。 而且我不想浪费资源在docker中运行apache。