我已经将Apache设置为使用HSTS,仅用于testing和学习的目的: /etc/apache2/sites-enabled/000-default.conf NameVirtualHost 192.168.3.55:80 NameVirtualHost 192.168.3.55:443 ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> <VirtualHost www:80> ServerName www ServerAdmin webmaster@localhost DocumentRoot /var/www/html </VirtualHost> <VirtualHost www:443> ServerAdmin webmaster@localhost DocumentRoot /var/www/html ServerName www SSLEngine on SSLCertificateFile "/etc/apache2/ssl/mysitename.crt" SSLCertificateKeyFile "/etc/apache2/ssl/mysitename.key" Header always set Strict-Transport-Security "max-age=63072000;includeSubdomains;" </VirtualHost> 我可以连接到端口80和端口443就好了。 […]
我已经inheritance了一个Web应用程序,并且在下面是一组.htaccess规则。 在我看来,他们什么都不做。 有人可以解释他们在做什么吗? 对我来说,它看起来像只匹配到站点根目录,检查目录是否不存在(!),然后301redirect到站点根目录。 RewriteCond %{REQUEST_URI} /$ RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)/$ $1 [L,R=301]
我知道这里和这里有重复的问题,但这些还没有解决我的问题。 当在浏览器的url栏中键入localhost时,它将被正确地redirect到https://localhost ,但是在我的代码中用于加载具有http文件的所有调用都不会被redirect或重写为https 。 例如: <link rel="stylesheet" type="text/css" href="http://static/css/colwidth.min.css"> 我已经尝试在VirtualHost部分的Apacheconfiguration文件中Redirect permanent / https://localhost/ ,我也尝试使用.htaccess RewriteRule 我得到的Firefox错误是: 阻止加载混合活动内容“ http://static/css/colwidth.min.css ” 我将不胜感激帮助理解如何做到这一点与Apacheconfiguration和.htaccess (我知道.htaccess不是首选的方法 – 但我仍然想明白为什么它不工作) HTTP: <VirtualHost *:80> ServerAdmin me@localhost DocumentRoot "D:/Website/path/to/root" ServerName localhost Redirect permanent / https://localhost/ <Directory "D:/Website/path/to/root"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Require ip 127.0.0.1 </Directory> </VirtualHost> <VirtualHost *:80> ServerAdmin me@localhost DocumentRoot […]
我们有一个小办公室(目前有4个人),并且专门与医疗保健数据(HIPAA保护)一起工作。 在过去的两年中,我们一直使用WAMP服务器(我的数据库的容量大约为500GB)将所有客户端数据存储在本地机器上的mysql数据库中。 我正在使用戴尔XPS 8300英特尔酷睿i7-2600 @ 3.4GHz和16GB内存。 当连接到我们的networking时,任何人都可以访问我的机器上的networking服务器,并在数据库中执行他们所需的任何操作,或访问networking服务器上托pipe的任何页面。 由于我们的数据的性质(受HIPAA保护),任何云托pipe都是不可能的,不需要花费大量的资金。 我的问题是: 购买服务器在办公室使用是否值得? 这个想法是,在升级电脑之前,我们不需要购买超高性能的台式机,而是更多的依靠一台像样的服务器来完成繁重的数据库工作。 还有其他的事情我需要考虑吗? 谢谢你的时间!
我已经用mod_auth_kerb设置了Apache HTTPD 2.4,在Active Directory上创build了一个服务帐户,为我的http主机名添加了一个SPN,在linux机器上创build了一个keytab文件,并且SSO开始很好地为从IElogin到AD域的用户。 这一切都很好! 但是,每周左右,用户不是login到网站,而是得到一个http基本authentication提示,不接受他们的凭证。 查看httpd服务器日志,我们看到如下条目: [auth_kerb:error] [pid 8040] [client 192.168.100.100:54460] gss_accept_sec_context() failed: Unspecified GSS failure. Minor code may provide more information (, Key version number for principal in key table is incorrect) 似乎发生的事情是AD上的KVNO(Kerberos密钥版本号)已经增加,所以他们的keytab是无效的。 我们可以通过这样做来看到: $ kinit '[email protected]' Password for [email protected] $ kvno HTTP/sso.example.com HTTP/[email protected]: kvno = 12 $ klist -k krb5-keytab Keytab name: […]
当一个服务器(nginx,apache)正在监听所有接口(0.0.0.0)时,当其中一个接口出现故障或被修改(可能改变IP地址)时会发生什么情况,如果服务器已经build立一个dynamic的DNS? 它是否必须重新启动?
我试图设置一个由Apache使用的自签名通配符证书,通常这是非常简单的,我只需要在根域中设置一个主题名,并在通用名字段中指定* .dcrdev.com。 但是,似乎这是行不通的 – 当我尝试访问该网站的铬或testing它在sslabs他们报告时访问任何子域名,如www.dcrdev.com或subdomain1.dcrdev.com不匹配。 我不知道为什么,当我在chrome中查看证书信息时,它显示的通用名称是* .dcrdev.com。 我的csr: Certificate Request: Data: Version: 0 (0x0) Subject: C=GB, ST=South Yorkshire, L=Sheffield, O=DCR Holdings, OU=DCR Development, CN=*.dcrdev.com/[email protected] Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (4096 bit) Modulus: lah blah 我的证书: Certificate: Data: Version: 3 (0x2) Serial Number: 1048577 (0x100001) Signature Algorithm: sha256WithRSAEncryption Issuer: C=GB, ST=South Yorkshire, […]
这是我的代码文件权限设置: groups apache > apache : apache www groups user1 > user1 : user1 wheel www 意思是有一个专门的组和apache和user1 。 /var/www上的权限是2775 ,拥有者是user1:www ,意思是所有的子文件和子文件夹都在www组中。 现在我想知道的是为什么apache能够执行.php文件,即使他们有664权限? 我正在使用的系统是Fedora。
我有一个Ubuntu服务器托pipe几个网站,一些WordPress的一些只是纯HTML,但每一个页面上有完全相同的Google Analytics脚本,当我在网页浏览器中查看源代码。 我无法弄清楚这是如何被添加到每一个网站,因为其中有些只是一个HTML页面。 如果您查看源代码并查看底部(就在结束标签之前),您将看到该脚本。 以下是两个网站: https : //landlinenews.com/ http://enertiadataentry.com/ 是否有某处,也许是一个Apacheconfiguration文件,可能已经被修改,添加这个?
我有一个新的Debian不稳定的基于apache2的发行版。 Apache本身工作正常。 如果我使用 sudo service apache2 start 它出现,一切顺利。 但是它的服务无法启动每一次启动。 如何在这里跟踪错误? 等/日志/的Apache2 / error.log中: [Sun Jan 15 14:51:06.685936 2017] [mpm_prefork:notice] [pid 2208] AH00169: caught SIGTERM, shutting down [Sun Jan 15 14:51:47.842447 2017] [mpm_prefork:notice] [pid 2200] AH00163: Apache/2.4.23 (Debian) configured — resuming normal operations [Sun Jan 15 14:51:48.145808 2017] [core:notice] [pid 2200] AH00094: Command line: '/usr/sbin/apache2' [Sun […]