基本上现在我们的服务器设置得有点过于安全,fail2ban禁止刚刚浏览网站的用户,即使只有一个丢失的图像。 我需要禁用以下哪项apache设置才能阻止这种情况的发生: [apache] enabled = true port = http,https filter = apache-auth action = iptables[name=httpd, port=http, protocol=tcp] sendmail-whois[name=httpd, dest="%(destemail)s", [email protected]] logpath = /var/log/apache*/*error.log maxretry = 3 [apache-ssl] enabled = true port = http,https filter = apache-auth action = iptables[name=httpd, port=https, protocol=tcp] sendmail-whois[name=httpd, dest="%(destemail)s", [email protected]] logpath = /var/log/apache*/*error.log maxretry = 3 [apache-multiport] enabled = true port […]
我希望能够将进入我的中央服务器的http和httpsstream量redirect到不同的虚拟服务器。 我有一个主机(中央服务器)和四个不同的客人。 每位嘉宾都有一个不同域名的网站。 每个域名从外部parsing到我的主机服务器。 在我的主机上,我configurationApache使用VirtualHosts和ProxyPass(&ProxyPassReverse)将端口80的请求redirect到正确的相应的guest虚拟机。 这工作正常。 喜悦 但是其中两个域也configuration了ssl,并且也在443端口上侦听。这里是错误的地方。 我得到SSL证书错误,我不知道如何解决这些问题。 NameVirtualHost 192.168.1.1:80 ServerName www.domain1.nl ProxyPreserveHost在ProxyPass / http://www.domain1.nl/ ProxyPassReverse / http://www.domain1.nl/ ErrorLog日志/ domain1-error_log CustomLog日志/ domain1-access_log结合 <VirtualHost 192.168.1.1:80> ServerName www.domain2.net ProxyPreserveHost On ProxyPass / http://www.domain2.net/ ProxyPassReverse / http://www.domain2.net/ ErrorLog logs/domain2-error_log CustomLog logs/domain2-access_log combined </VirtualHost> <VirtualHost 192.168.1.1:80> ServerName www.domain3.org ProxyPreserveHost On ProxyPass / http://www.domain3.org/ ProxyPassReverse / http://www.domain3.org/ ErrorLog logs/domain3-error_log […]
我想弄清楚什么决定了Web服务器上的“默认”网站。 我正在运行一个托pipe5个不同网站的Ubuntu 10.04networking服务器。 在我的apache2 / sites-available文件夹中,这5个站点都有这样的条目: <VirtualHost *:80> ServerName mysite.ca ServerAlias www.mysite.ca ServerAdmin [email protected] DocumentRoot /home/sites/Dropbox/mysite.ca/ <Directory /home/sites/Dropbox/mysite.ca/> Options -Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> </VirtualHost> 当我尝试通过IP地址从防火墙后面的计算机以及Active Directory中访问此Web服务器时,其中一个站点的网页将加载,但我更愿意加载其他站点。 我怎样才能控制我的networking服务器默认加载哪个网站?
我正在pipe理一台托pipeOTRS Web服务器的机器。 它有一个普通的用户,'otrs',它运行几个周期性的任务,并保持(在他家)所需的服务文件。 然后是Apache用户,它运行的Web服务器,使应用程序的工作。 'otrs'用户在'apache'组中,所以我可以在某些文件夹中给'apache'写授权。 为了添加一些function,我需要在'otrs'主目录中给'apache'写授权。 但是,如果我这样做,ssh将不会连接授权密钥,因为这是一个安全风险。 我已经尝试使用ACL的'阿帕奇'写授予'otrs'家,但不是在家/ .ssh,但它不会工作。 那么,我能做什么? 我曾经想过删除'otrs'用户,做所有事情'apache',或者运行web服务器守护进程作为'otrs'用户,但我不知道怎么做,或者如果他们可能带来一些问题… 你有没有我没有想到的select?
我的.htaccess文件适用于任何需要1特定文件夹的罚款。 结果, http://www.mydomain.com/administration/index.php //www.mydomain.com/administration/index.php意外地进入401错误页面,而不是从pipe理文件夹加载index.php 。 所以,对于pipe理文件夹,我希望: 1)总是用httpsreplacepipe理文件夹(对于其他文件夹,.htaccess的最后一部分工作正常)。 2)不要redirect的URL,如果他们去pipe理文件夹。 3)1)和2)之后的所有规则对pipe理文件夹无效。 我试图添加2)和3).htaccess。 所以,现在我的.htaccess文件如下所示: #adds www – always, for any url, for any folder RewriteCond %{HTTP_HOST} !^www.mydomain.com$ RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L] #special rules for administration folder only – set https if not https RewriteCond %{REQUEST_URI} ^/administration RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R,L=301] #all requests to administration folder […]
在这里看到我的APC: http : //www.animefushigi.com/apc.php 如果持续点击左上angular的刷新button,请观察“命中”的数量和“开始时间”和“正常运行时间”值。 他们都上下。 我觉得这很奇怪,通常这三个值都应该随着时间的推移而变高,而不是下降(开始时间除外 – 应该保持不变) 我唯一的假设是caching每秒刷新一次。 我已经四处搜寻,并尝试了一些事情来解决这个问题 禁用suEXEC 设置apc.mmap_file_mask / dev / zero 试过PHP 5 Handler的fcgi和cgi 也当我去/ tmp /上的SSH和做 – 我没有看到任何APC相关。 有什么build议么 ? 服务器是linux,使用whm / cpanel *编辑:我怀疑这个问题可能是由于apc.mmap_file_mask。 目前它被设置为/tmp/apc-animefus.XXXXXX但是在apc.php页面上,似乎xxxxxx在每次刷新时被replace为别的东西
我使用apache2-mpm-itk来运行我的Web应用程序之一,用于自定义uid和gid,这两者都是出于审计和安全原因。 这很好,但是我不确定这个用户需要什么样的特权。 我目前正在做一些像useradd mywebapp -U -d/tmp -c"Custom webapp User"但创build了一个普通的用户。 所以首先一个新手问题:我如何添加一个“系统”用户,可以不能用于例如ssh'in或不出现在Ubuntu桌面上的login屏幕? 我需要给这个用户什么样的特权? 例如,我假设www-data可以写入Apache日志文件,所以它需要比普通用户更多的东西。 但同时,我不想给它更多的权限运行我的web应用程序,绝对不是根。
如何configurationApache使用特殊端口时加载特殊文件夹? 文档根目录是: www\ 现在我想要加载www\folder\当我inputhttp://localhost:8090/上的url。 我想我应该创build一个虚拟主机。 但不知道如何configuration它。
我已经厌倦了,我无法启动apache,我重新安装了几次,但是它不起作用,出现了不同的情况,比如防火墙或者其他什么,但是现在我无法运行apache普通的原因。 “请求的操作失败”,我用CMD,我有错误: F:\server\apache\Apache2\bin>apache Syntax error on line 60 of F:/server/apache/Apache2/conf/httpd.conf: Cannot load F:/server/apache/modules/mod_actions.so into server: \xcd\xe5 \xed\x e0\xe9\xe4\xe5\xed \xf3\xea\xe0\xe7\xe0\xed\xed\xfb\xe9 \xec\xee\xe4\xf3\xeb\xfc . F:\server\apache\Apache2\bin> 如果我在第60行注释错误将在下一行,有一个模块文件和Apache不能运行它们,我认为这是所有'CAZ目录错误,但哪一个相同的,到处都是我写的正确的path?
我正在尝试添加另一个虚拟主机到现有的主机列表(/ etc / apache2 / sites-availible / default)。 以下是当前设置的部分副本: <VirtualHost *> (<– currently working) ServerAdmin [email protected] Servername nyenrodejazznight.nl DocumentRoot /home/nrjazznight/html <Directory "/home/nrjazznight/html"> AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *> (<– added and not working) ServerAdmin [email protected] ServerName ncvlustrum.nl ServerAlias www.ncvlustrum.nl DocumentRoot /home/lustrum/html <Directory "/home/lustrum/html"> AllowOverride None Order allow,deny Allow from all […]