我知道这个问题之前已经提出过了,但是我发誓我已经读完了其他的post。 我在Apache / 2.4.7(Ubuntu)服务器上使用虚拟主机来托pipe多个WordPress站点。 我有一个网站,SiteA运行正常,但SiteB(SiteBroken)没有运行。 我通过apt-get安装了apache,我的configuration文件是 /etc/apache2 -rw-r–r– 1 root root 7.3K Mar 28 15:29 apache2.conf 我已经阅读了关于改变用户在这个文件(我不确定)或通过chown命令,因此我的权限SiteA与SiteB /var/www/SiteA/public_html total 188k drwxr-xr-x 5 root root 4.0K Mar 31 00:42 .. -rw-r–r– 1 root root 25K Apr 4 20:23 wp-signup.php -rw-r–r– 1 root root 11K Apr 4 20:23 wp-settings.php -rw-r–r– 1 root root 33K Apr 4 20:23 […]
我把security2模块安装到了我的apache服务器上,把下面几行添加到我的httpd.conf中: <IfModule security2_module> Include crs/owasp-modsecurity-crs/modsecurity_crs_10_setup.conf Include crs/owasp-modsecurity-crs/base_rules/*.conf </IfModule> 当我想通过http访问我的服务器时,我得到如下信息:“ Forbidden You don't have permission to access / on this server ” 然后我去了该模块日志,我看到以下错误: –72348f1e-B– GET / HTTP/1.1 Host: 192.8.9.70 Connection: keep-alive Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36 Accept-Encoding: gzip, deflate, sdch Accept-Language: en-US,en;q=0.8,es;q=0.6,da;q=0.4 –72348f1e-F– HTTP/1.1 403 […]
我有一个VPC上的WordPress网站,我试图调整ModSecurity以减less误报。 当ModSecurity被激活时,我有Jetpack监视被拒绝。 从Apache error.loglogging [Sun Jul 26 20:25:31.569393 2015] [:error] [pid 5544] [client 192.0.84.33] ModSecurity: Access denied with code 403 (phase 2). Operator EQ matched 0 at REQUEST_HEADERS. [file "/etc/modsecurity/activated_rules/modsecurity_crs_21_protocol_anomalies.conf"] [line "47"] [id "960015"] [rev "1"] [msg "Request Missing an Accept Header"] [severity "NOTICE"] [ver "OWASP_CRS/2.2.9"] [maturity "9"] [accuracy "9"] [tag "OWASP_CRS/PROTOCOL_VIOLATION/MISSING_HEADER_ACCEPT"] [tag "WASCTC/WASC-21"] [tag […]
我的networking服务器运行( apache 2.4.10 )不同的虚拟主机为以下域名: foo.example.com bar.example.com www.example.com example.com 这是我的虚拟主机的configuration文件: <VirtualHost *:80> DocumentRoot /var/www/ Redirect 404 / ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> <VirtualHost *:80> ServerName foo.example.com DocumentRoot /var/www/foo/ ErrorLog ${APACHE_LOG_DIR}/foo-error.log CustomLog ${APACHE_LOG_DIR}/foo-access.log combined </VirtualHost> <VirtualHost *:80> ServerName bar.example.com DocumentRoot /var/www/bar/ ErrorLog ${APACHE_LOG_DIR}/bar-error.log CustomLog ${APACHE_LOG_DIR}/bar-access.log combined </VirtualHost> <VirtualHost *:80> ServerName example.com ServerAlias www.example.com DocumentRoot /var/www/www/ ErrorLog […]
我很困惑,Apache 2.4中的虚拟主机是如何工作的。 我已经启用虚拟主机,我有两个网站设置在我的服务器上。 我认为这意味着默认主机(/ var / www / html)不起作用了。 但是httpd.conf的哪些部分被虚拟主机覆盖? httpd.conf中包含的“conf.d”是否适用于虚拟主机,还是必须手动分配? 我在httpd.conf中为RemoteIPHeader分配了一个特殊的头文件,是否必须在每个虚拟主机的.conf文件中包含这一行? 请帮我理解启用虚拟主机时httpd.conf是如何工作的。 谢谢!
在发送邮件后,我们的rackspace wordpress服务器遇到中等stream量的问题,我们遇到了麻烦。 服务器规格是: CPU 2 vCPUs RAM 2 GB System Disk 80 GB Network 240 Mb / s Disk I/O Good 运行: Centos 7.0 WordPress 4.3.1 Httpd 2.4.6 PHP 5.4.11 MariaDB 5.5.41 据我所知,安装是相当标准的,数据库非常标准,索引和相当小。 我们也是wordpress对象caching。 根据新的遗物; 在正常stream量期间,该站点花费PHP的大约80%的时间,15%的时间花费在web外部,并且在数据库中仅占很小的百分比。 平均标准页面的应用程序时间大约是800毫秒,这对我来说似乎很慢。 在1分钟内运行250个连接的负载testing会导致连接逐渐变长,然后在大约30分钟后开始超时,并且服务器无法响应(即使stream量停止响应)。 它需要重新启动才能重新启动。 我无法使用putty连接,并且主页在超时和返回可怕的“build立数据库连接错误”之间振荡。 在最近的testing中使用机架空间监控代理,看起来CPU在死亡之前达到了100%,内存使用率达到了1.6GB左右,并且下降到了100MB左右。 它看起来像大约2GB的交换内存(总共4GB)也被使用。 标准的使用率似乎是15%的CPU,800MB的内存和400MB的交换。 我们的Apacheconfiguration没有设置以下任何一项( /etc没有文件); 超时,KeepAlive,MaxKeepAliveRequests,KeepAliveTimeout; 所以我猜测它正在使用默认值。 我已经看了mariadb设置: innodb_buffer_pool_size = 1400M max_user_connections = 0 这似乎不是原因。 […]
我们开发网站,并将QA环境托pipe在与生产环境相同的服务器上。 我想为所有质量检查站点提供特定的robots.txt,但不是针对生产站点。 我们有很多站点,所以我不想更新数百个虚拟主机configuration块。 QA站点很容易从域名和目录中识别.QA和生产站点分为两个不同的目录。 所有质量检查站点都托pipe在* .qa.mycompany.com下。 生产示例:host:example.org docroot:/var/www/production/example.org 示例QA:host:example.qa.mycompany.com docroot:/var/www/qa/example.org 有没有办法将Apacheconfiguration为为所有QA站点提供robots.txt,而不需要更新所有QA vhostconfiguration?
我想在Apache(2.4.7)服务器提供的域( /home/www/public )的子文件夹( /home/www/public/v1 )中运行meteor.js应用程序。 我已经build立了一个虚拟主机,监听端口80,并代理以“v1”开始的位置到nodejs应用程序。 它工作正常(我认为),除了我得到一个由meteor.js生成的404页面。 我必须修改meteor.js设置来接受来自“domain.tld / v1”而不是“domain.tld”的请求吗? 如果是这样,哪个文件? 这种设置可能吗? 虚拟主机configuration (为易读性编辑) <VirtualHost *:80> ServerName domain.tld DocumentRoot /home/username/www/domain.tld/public <Directory /> Options FollowSymLinks AllowOverride All Require all granted </Directory> <Directory /home/username/www/domain.tld/public/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from All Require all granted </Directory> # NODEJS APP in V1 FOLDER ProxyRequests on […]
我有一个这样的服务器上的redirect设置: <IfModule mod_rewrite.c> RewriteEngine On #redirect all port 80 traffic to 443 RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=302,L] </IfModule> 现在我想排除一个域名,我似乎无法解决… 这是我试过的: <IfModule mod_rewrite.c> RewriteEngine On #redirect all port 80 traffic to 443 RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST) !example.com RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=302,L] </IfModule> 不过,它仍然会将http://example.comredirect到https://example.com 。 我究竟做错了什么? PS。 我在其他浏览器尝试,所以浏览器caching不应该是一个问题。
我有一个Vagrant机器: Apache / 2.4.10(Debian) PHP 5.6.14-0 + deb8u1和PHP-FPM。 在某些情况下,我得到这个错误:500内部服务器错误。 我在php5-fpm.log中有这个消息 [09-Dec-2015 20:01:24] WARNING: [pool www] child 608 exited on signal 11 (SIGSEGV) after 368.307577 seconds from start 而在error.log文件中,我有这个消息: [Wed Dec 09 20:01:24.944748 2015] [fastcgi:error] [pid 535:tid 140236008924928] (104)Connection reset by peer: [client 192.168.33.1:57201] FastCGI: comm with server "/usr/lib/cgi-bin/php5-fcgi" aborted: read failed [Wed Dec 09 20:01:24.945014 […]