我进入我的服务器错误日志。 [Mon Jan 27 08:04:06 2014] [alert] [client xxxx] /home/…/public_html/.htaccess:命令'Header'无效,可能是拼写错误或未包含在服务器configuration中的模块 这里是我简单的.htaccess : <IfModule mod_rewrite.c> Options -MultiViews php_flag display_startup_errors on php_flag display_errors on php_flag html_errors on RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^ silex.php/ [L] </IfModule> 什么可能是错的?
我已经阅读了这么多的资源,但是我仍然在努力做到这一点。 背景:我正在使用带有LAMP设置的Amazon EC2实例 bitbucket上有这个回购有几个目录: _fixtures , oldfiles _fixtures , oldfiles , psds 。 我只想将webfiles目录放在/var/www/html/的webroot上面。 我克隆了回购到我的家庭文件夹,我已经试过符号链接 ln -s /home/myuser/myrepo/webfiles /var/www/html/webfiles 这导致403禁止访问错误。 我已经尝试了chmod的webfiles文件夹属于阿帕奇组(所以它会有读取权限),但这并没有帮助。 我也有 <VirtualHost *:80> <Directory "/var/www/html"> allow from all Options -Indexes FollowSymlinks AllowOverride All </Directory> 在我的httpd.conf中启用符号链接,但是还是什么都没有。 任何帮助我如何能够完成这个链接,将不胜感激。 编辑 基于这个SO线程+答案,我将采取只检出webfiles目录的策略。 编辑2 这已经有一段时间了,但是我想在这里放一个便条,说另外一个解决scheme,我可以尝试将这个repo克隆到/var/www/repos/myrepo ,然后从那里符号链接webfiles目录。 这将会更简单,因为权限更可能已经到位/var/www 。
我有这个设置 Server version: Apache/2.2.22 (Ubuntu) OpenSSL 1.0.1c 10 May 2012 一个连接了多个域的IP。 example1.com我有一个签名的SSL证书,因此可以通过https://secure.example1.com访问example1.com example2.com也是如此(用有效的证书签名,可通过https://secure.example2.com访问) 但是, example3.com没有任何SSL证书绑定,并且不能通过https (SSL端口443)访问。 但是, 当用户转到https://example3.com会显示警告。 在Chrome中,它看起来像这样 您试图访问example3.com,但是实际上您已经到达了将自己标识为secure.example1.com的服务器。 这可能是由于服务器configuration错误或更严重的原因造成的。 您的networking上的攻击者可能会试图让您访问example3.com的假(可能有害)版本 如果您忽略警告,则用户将实际显示secure.example1.com的内容 VirtualHost设置看起来像这样 <VirtualHost *:443> ServerName secure.example1.com DocumentRoot /var/www/blahblah SSLEngine on SSLCertificateFile /blahblah.crt SSLCertificateKeyFile /blahblah.key SSLCertificateChainFile /blahblah.pem </VirtualHost> <VirtualHost *:443> ServerName secure.example2.com DocumentRoot /var/www/blahblah SSLEngine on SSLCertificateFile /blahblah.crt SSLCertificateKeyFile /blahblah.key SSLCertificateChainFile /blahblah.pem </VirtualHost> <VirtualHost […]
我试图设置一个自签名的SSL证书,所以我可以开发我的应用程序与SSL(所以我终于可以让我的网站运行SSL …)。 我已经创build了一个带有无头API(Lumen)的Angular网站,并尝试使用来自ServerFault的问题设置一个多域SSL证书: 如何为Apache2创build一个多域自签名证书? testing命令签出,所以我试图安装与以下Apacheconfiguration的证书: <VirtualHost *:80> ServerAdmin [email protected] ServerName api.gamersplane.local DocumentRoot /var/www/GamersPlane.api/public <Directory /var/www/GamersPlane.api/public/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> ErrorLog "|/usr/bin/cronolog /var/log/gamersplane/%Y/%m/%d/error.log" # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel notice CustomLog ${APACHE_LOG_DIR}/gamersplane/access.log combined SSLEngine on SSLCertificateFile /var/www/GamersPlane.api/ssl/gamersplane.local.pem SSLCertificateKeyFile /var/www/GamersPlane.api/ssl/gamersplane.local.key </VirtualHost> 不幸的是,当我打我的网站,我得到This site can't […]
进入原来的httpd.conf,我有 Options Indexes FollowSymLinks 我在/etc/httpd/conf.d/中创build了一个configuration文件 NameVirtualHost 192.168.0.2:8009 <VirtualHost 192.168.0.2:8009> DocumentRoot /var/www/html/deve ServerName "deve:8009" ErrorLog /var/www/deve_errorlog CustomLog /var/www/deve_customlog common Options -ExecCGI -Indexes </VirtualHost> 我重新启动服务器,我仍然可以看到文件 http://192.168.0.2:8009/images 我认为更具体的规则覆盖了一般的规则 我在哪里错过了什么?
我正在寻找一个脚本,将轮streamApache上的博客。 我想在cron上安排脚本,这样它可以定期运行,并为服务器上的所有网站轮转access_log和error_log。 谢谢,马克
我最近用基本的LAMP栈(PHP / MySQL / Apache)设置了一个新的apache webserver。 我很好奇什么样的性能监控解决scheme是典型的 – 实际上,我只是在寻找一个很好的方法来衡量我设置的主机是否足够强大,以处理负载。 目前为止,我一直在用正常运行时间命令检查服务器上的负载,以检查历史平均值。 我也一直在检查Apache服务器状态页面(这是只在本地可见)。 无论如何,我不觉得这些是真正提供我所期待的。 我会感谢任何意见和/或在正确的方向推动。 谢谢一堆! 山姆
我有一个Linux服务器,只是安装了postfix。 我是电子邮件服务器的新手… 无论如何,我能够发送邮件与PHP的邮件function,但他们被认为是谷歌邮件(也可能是大多数其他电子邮件帐户,还没有testinghotmail,雅虎等“垃圾邮件”)。 我猜测它与SPF有关,但是我不知道SPF是什么,如何修复它等等。 任何人都可以解释如何使我的电子邮件“非垃圾邮件”,他们不是? 操作系统是Ubuntu 9.10。 如果你需要更多的input,让我知道… 谢谢 PS:如何禁用所有传入邮件到我的后缀(电子邮件服务器),而不使用我的防火墙,也许通过使用main.cf?
我在Debian 5 64bit上卸载了apache2。 然后我删除了/etc/apache2并重新安装了apache。 该文件夹仍然丢失,我不知道如何获取Apache文件(与模块等)。 我如何恢复一切?
我有一个Apache的CentOS5服务器,它有一个外部IP地址,主机名为“example.com”。 我喜欢的是那个 sub1.example.com sends http requests to 10.10.10.10 sub2.example.com sends http requests to 10.20.20.20 看着Apache的mod_proxy ,我无法弄清楚我需要configuration什么。 有人知道如何做到这一点?