Articles of apache 2.4

Apache服务器不听80端口

我的工作站和服务器都在同一个局域网段上,可以相互ping通(而且我可以从我的工作站ssh进入服务器,没有问题)。 在centos 7上安装了一个默认的apache。 启动服务,但我无法从我的工作站浏览到我的networking服务器。 nmap报告端口80被过滤。 我禁用了服务器上的SELinux,但端口仍然被过滤。 这是netstat -l给我的: Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN tcp 0 0 localhost:smtp 0.0.0.0:* LISTEN tcp6 0 0 [::]:http [::]:* LISTEN tcp6 0 0 [::]:ssh [::]:* LISTEN tcp6 0 0 localhost:smtp [::]:* LISTEN raw6 0 0 [::]:ipv6-icmp [::]:* 7 奇怪的是,netstat -na将端口80显示为监听,但对于ipv6(尽pipe我在某处读取这并不意味着它不监听ipv4) Proto […]

为什么Apache2作为iperf服务器?

我的问题:有谁知道为什么apache2服务器可以作为一个iperf服务器? 我以为apache2服务器只会回应HTTP请求。 我的情况:我不小心意识到,将iperf客户端连接到端口80时,apache2服务器可以充当iperf服务器。 我的设置:两个直接相互连接的Ubuntu服务器14.03。 命令: On Server1: user@server1:~$ sudo service apache2 status * apache2 is running user@server1:~$ sudo netstat -aple | grep http tcp6 0 0 [::]:http [::]:* LISTEN root 18567325 21985/apache2 user@server1:~$ 另一方面: On Server2: user@server2:~$ iperf -c 192.168.2.2 -p 80 ———————————————————— Client connecting to 192.168.2.2, TCP port 80 TCP window size: 45.0 KByte […]

如何限制端口80的httpd进程号

所以可以说我有80个端口上的httpd 10个实例和443上的另外10个。 我通过443运行所有的东西,所以我没有看到需要平衡连接(80只用于redirect到443) 如何将端口80减less到5个实例并将端口443增加到15个? 什么调节过程的数量? (我发现控制connections信息,没有关于这个,或者我不知道要search什么)

虚拟主机不在Fedora 22中工作

最近我已经从Ubuntu转到Fedora Workstation作为我的开发环境,以便更好地理解centOS服务器(以及其他原因)。 我一直在试图build立一个本地LAMP堆栈进行开发。 这是我的atm : httpd Apache/2.4.16 (Fedora), runs as apache/apache, mod_php is disabled, handler is "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost" php 5.6.14 php-fpm runs as apache/apache, path is /run/php-fpm/www.sock, process type is mpm_event /etc/httpd/conf.d/php.conf <IfModule !mod_php5.c> <FilesMatch \.php$> SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost" </FilesMatch> </IfModule> 我还没有真正引起/etc/httpd/conf/httpd.conf任何设置。 服务器和PHP似乎为/var/www/html正常工作,但是当我尝试创build一个新的VirtualHost ,我得到了所有目录403 。 我正在尝试通过添加一个configuration文件到一个新的虚拟主机: /etc/httpd/conf.d/sites.conf <VirtualHost *:80> ServerName site1.local ServerAlias site1alias.local DocumentRoot /home/myuser/Projects/site1/www <Directory /home/myuser/Projects/site1/www> […]

升级Apache之后,是否需要退出SSL证书?

我最近对运行Web应用程序的服务器进行了一系列升级: PHP 5.3到PHP 5.5 Apache 2.2到Apache 2.4 更确切地说,升级要求卸载Apache,PHP和所有mod(包括mod_ssl),并安装新版本。 在安装更新ssl.conf与我的证书/ PK的path更新之前,当试图启动Apache,我在ssl_error_log得到以下3个错误: AH02561: Failed to configure certificate [theserver]:443:0, check [/path/to/me/crt] SSL Library Error: error:0906D066:PEM routines:PEM_read_bio:bad end line SSL Library Error: error:140AD009:SSL routines:SSL_CTX_use_certificate_file:PEM lib 我的第一个猜测是为什么重新安装改变了环境,使得证书在服务器上不再有效。 我可以重新发布,但在我的情况下,这意味着我的生产环境中有一些停机时间,并重新configuration一个负载均衡器,如果情况并非如此,我想避免这种情况。 这个证书是否需要辞职/重发,还是我在看另一个错误?

如何从命令行列出当前的Apache 2虚拟主机?

我想要检索当前加载的虚拟主机列表,并侦听请求,即不只是grepconfiguration文件。 它看起来像apache2ctl -S这样做,但我不是100%确定,如果这只是返回configuration文件中包含的内容。

Apache TLS(SSL)性能

我们正在运行一个function非常强大的专用服务器,其中包括运行Centos 6的Xeon CPU,32GB RAM和RAID SSD。但是,我们仍然看到HTTPS在我们的页面下载时间内添加了超过100毫秒的时间。 有什么我们可以做甚至加速20ms? 这里是Apache的设置: SSLHonorCipherOrder on SSLRandomSeed startup file:/dev/urandom 512 SSLRandomSeed connect file:/dev/urandom 512 SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-EC$ SSLProxyCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECD$ SSLProtocol all -SSLv3 -SSLv2 SSLProxyProtocol all -SSLv3 -SSLv2 SSLPassPhraseDialog builtin SSLSessionCache "shmcb:/var/run/ssl_scache(5120000)" SSLSessionCacheTimeout 300 SSLUseStapling On SSLStaplingCache "shmcb:/var/run/ssl_stapling(128000)" SSLStaplingReturnResponderErrors off SSLStaplingStandardCacheTimeout 3600 SSLStaplingErrorCacheTimeout 600 SSLStaplingResponderTimeout 5

在Ubuntu上安装Apache2时出错

我用命令sudo apt-get install apache2并得到下面的错误: 有什么build议么? # sudo apt-get install apache2 The following NEW packages will be installed: apache2 apache2-bin apache2-data libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap ssl-cert 0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded. Need to get 1,285 kB of archives. After this operation, 5,348 kB of additional disk space will be […]

如何设置Apache,使example.com和www.example.com这两个域都能提供相同的内容?

我有一个域 – example.com 。 以下是我的DNSlogging 。 example.com A IP address www.example.com A IP address 这是我的Apache虚拟主机configuration。 <VirtualHost *:80> ServerName www.example.com DocumentRoot /var/www/public_html/www.example.com </VirtualHost> 现在,当我在浏览器中inputexample.com (没有www部分)时,我从DocumentRoot得到默认的Apache页面文件。 当我将www添加到我的域时,一切正常。 现在的问题是如何设置这个域名www.example.com和example.com服务于文件根目录相同的文件? 我应该在DNS级别处理这个问题还是以某种方式configurationWeb服务器? 所有这一切都是白搭,所以这个问题可能是愚蠢的。

Apache 2.4 envvars被忽略

我将服务器从Debian 7升级到了Debian 8.结果,我在Apache 2.4.10上遇到了很多问题 在做: apache2 -S 结果: AH00111: Config variable ${APACHE_LOCK_DIR} is not defined AH00111: Config variable ${APACHE_PID_FILE} is not defined AH00111: Config variable ${APACHE_RUN_USER} is not defined AH00111: Config variable ${APACHE_RUN_GROUP} is not defined AH00111: Config variable ${APACHE_LOG_DIR} is not defined AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf: Invalid Mutex directory in […]