我已经在我的本地主机上设置了2个站点。 一个在localhost:8197和一个在fc.localhost:8197当然,为了做到这一点,我编辑了我的/ etc / hosts文件来包含 fc.localhost 127.0.0.1 所以,这些是我的configuration分别为每个站点: 000-default.conf(位于localhost的站点): <VirtualHost *:8197> ServerAdmin webmaster@localhost DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined <Directory /var/www/html/> Options +Indexes +FollowSymLinks +ExecCGI AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> fc.conf(网站位于fc.localhost): <VirtualHost *:8197> ServerAdmin webmaster@localhost DocumentRoot /home/alex/Documents/fc/Website/fc/html ServerName fc.localhost ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined <Directory /home/alex/Documents/fc/Website/fc/html> Options +Indexes +FollowSymLinks +ExecCGI […]
所以我得到403: Forbidden在我的apache2.4虚拟主机之一的错误。 有趣的是,/ /var/log/apache2/error.log报告: authz_core:error] [pid 4878:tid 140394394269440] [client 10.214.154.19:33009] AH01630: client denied by server configuration 而且….虽然我还有其他使用authz的虚拟主机(主要用于颠覆主机),但除了我遇到的问题之外,我禁用了所有这些虚拟主机,重新启动了Apache,而且没有明显的区别。 这里是我的Apache2站点可用的文件,尽pipe我禁用了所有其他主机configuration,并将我的configuration降到最低,但仍然拒绝访问。 <VirtualHost *:443> WSGIScriptAlias /example /data/example/example.wsgi <Directory /data/example> WSGIApplicationGroup %{GLOBAL} Order deny,allow Allow from all Require all granted </Directory> LogLevel info SSLEngine on SSLCertificateFile /etc/ssl/certs/example.pem SSLCertificateKeyFile /etc/ssl/private/example.key </VirtualHost> 此外,为了validation它不是我的wsgi脚本,我用下面的脚本replace了脚本: def application(environ, start_response): start_response('200 OK',[('Content-type','text/html')]) return ['<html><body>Hello World!</body></html>'] 而这并没有任何明显的差异。 […]
我有一个很简单的问题,但我还没有find明确的解释。 虚拟主机conf中*:80和some_ip:80之间的实际区别是什么? 它是否像*:80只在该some_ipconfiguration的接口上监听所有接口和some_ip? 所以几乎如果我只有一个虚拟主机服务器上没有太大的区别?
我似乎最近在我的apache错误日志中得到了很多: Message: collections_remove_stale: Failed to access DBM file "/var/cpanel/secdatadir/ip": Resource deadlock avoided 服务器版本:Apache / 2.4.12(Unix)OpenSSL / 1.0.1e-fips mod_bwlimited / 1.4 mod_fcgid / 2.3.9使用modsecurity和最新的OWASP ModSecurity核心规则集 试图用googlesearch,发现一些规则,build议禁用,但没有解决问题。 任何帮助,将不胜感激。 谢谢。
我试图添加一个新用户通过Active Directory进行身份validation到Apache2(httpd)。 用户已经存在,属于一个域。 我本质上是遵循这个Apache和Subversionauthentication与Microsoft Active Directory文章中的说明。 但是,当我input: htpasswd C:\Apache2\conf\auth\svn_auth_file newuser1 我得到提示input新的密码(和它的重新input),然后我收到消息: Adding password for user newuser1 htpasswd: unable to update file C:\Apache2\conf\auth\svn_auth_file 什么可能会阻止该文件更新? 我究竟做错了什么?
我怎样才能检查我的服务器在午夜做什么,find他仍然持有的高内存高峰。 只有我在服务器上运行的是带有Flask应用程序的Apache2,以及用于某些Java服务的Tomcat7服务器,两者都没有任何作用。 有没有系统日志或什么可以告诉我发生了什么事? 新文物服务器统计信息: 浏览统计:
我有一个问题。 我在IP 1.2.3.4上有一个用于domain1.com的VirtualHost,但是Apache向IP 1.2.3.4请求回复,忽略了ServerName。 所以,如果我将domain2.com指向1.2.3.4,我会看到/var/www/html/domain1.com的内容,而不是/ var / www / html / default的内容 哪里不对? Listen 80 NameVirtualHost 1.2.3.4:80 <VirtualHost 1.2.3.4:80> SSLEngine off DocumentRoot /var/www/html/domain1.com ServerName www.domain1.com:80 <Directory "/var/www/html/domain1.com"> allow from all </Directory> LogLevel notice UseCanonicalName on </VirtualHost> <VirtualHost _default_:80> DocumentRoot /var/www/html/default <Directory /var/www/html/default> allow from all </Directory> </VirtualHost>
我有以下的apache2 / wsgiconfiguration,这工作正常,除了apache保持logging: [info] Initial (No.1) HTTPS request received for child 1 (server myserver:443) [error] [client <IP>] client denied by server configuration: /empty/<API_CALL> 每次调用“ https:// myserver / rest / API_CALL ” <VirtualHost *:443> ServerName myserver:443 DocumentRoot /empty/ <Directory /> Order allow,deny Deny from all </Directory> SSLEngine On SSLCertificateFile /cert.pem SSLCertificateKeyFile /key.pem SSLVerifyClient optional_no_ca SSLOptions +StdEnvVars […]
所以我知道这是一种可能性,我已经find了适用于旧版本的Apache的教程,但我找不到任何更新的教程。 我所要做的就是使用.rb和.erb文件,就像您已经可以在Apache2中使用.php文件一样。 我更喜欢ruby的小任务,这将是很好,如果我可以写在我的后端脚本。
我试图启用教育范围的DELETE http方法,但没有达到目标…我读了很多文档,但不明白在哪里,我必须设置它。 首先在哪里是默认的http方法的限制? 与OPTIONS / HTTP1.0我只能看到OPTIONS GET HEAD和POST作为允许的方法,其中的限制是什么?