Articles of apache2

Apache在哪里添加重写规则

我在EC2上使用AWS Elastic Load平衡。 我想编写一个Apache重写规则来将传入的stream量转换为ELB从http到https。 为了做到这一点,我已经读了,我需要更新我的/etc/httpd/conf/httpd.conf文件在服务器上包含: NameVirtualHost *:80 <VirtualHost *:80> ServerName mysite.example.com DocumentRoot /usr/local/apache2/htdocs Redirect permanent / https://mysite.example.com/ </VirtualHost> <VirtualHost _default_:443> ServerName mysite.example.com DocumentRoot /usr/local/apache2/htdocs SSLEngine On # etc… </VirtualHost> 但是,当我查看httpd.conf文件时,它包含: # Managed by Elastic Beanstalk PidFile run/httpd.pid # Enable TCP keepclive Timeout 60 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 60 <IfModule worker.c> StartServers 10 MinSpareThreads 250 […]

find所有apache2configuration文件中的DocumentRoot

我正在运行Apache 2.2的OSX服务器,其他人设置。 不知何故,他们改变了根网站服务器的目录。 但是,我已经search了/etc/apache2/所有configuration文件,而且我看到的默认DocumentRoot "/Library/WebServer/Documents"是: httpd.conf DocumentRoot "/Library/WebServer/Documents" 。 我已经grep'd在httpd.conf Include语句,他们只是在同一个configuration文件夹中的正常的。 我也grep'd这些.config文件以及没有任何更改DocumentRoot。 但不知何故服务器不是从库/ Web服务器/文件加载。 正在使用这些configuration文件,因为当我添加语法错误,服务器将无法启动。 有一个更高级别的configuration文件,我应该看看? 我远离apache大师,但我不知道还有什么可以尝试的。 有没有办法search所有包含的configuration文件的DocumentRoot被设置? 有没有另外一种方法来设置我缺less的默认Web目录?

Apacher Tomcatdebuggingconf文件

我正在AWS上使用Tomcat 8的一个Elastic Load Balancer。 我正在尝试重写,但没有任何事情发生, 详情请看这里 。 我有: /etc/httpd/conf/httpd.conf … Include conf.d/*.conf Include conf.d/elasticbeanstalk/*.conf … httpd.conf是由AWS设置的,我没有修改它。 但是,我想debugging,如果Included conf文件实际上正在执行。 题 如何在conf文件中写入一行来将debugging信息写入日志(以便我可以确定哪些命令正在执行)? 一旦完成,他们将写入哪些日志? 谢谢 题

强制Apache2发送Content-Length

我正在使用Apache2和mod_proxy来提供由一个封闭源http服务器生成的大文件(约15mb)。 由于该服务器不包括头Content-Length我不能显示我的jQuery页面中的下载进度。 有没有一个Apache模块或filter,让我强制该头? 这是Apache现在发送的头文件: < HTTP/1.1 200 OK < Date: Thu, 29 Jun 2017 20:53:40 GMT < Server: Apache/2.4.18 (Ubuntu) < Access-Control-Allow-Origin: * < Content-Type: application/dicom < Vary: Accept-Encoding < Content-Encoding: gzip < Transfer-Encoding: chunked

与Apache的LDAP身份validation没有工作

我正在尝试将apache2与ldap服务器进行身份validation。 基本上我想实现,通过我的phpldapadmin GUI在LDAP中创build的用户应该能够loginApache。 现在我得到“auth_basic:error] [pid 29367] [client 122.15.156.72:26588] AH01618:用户pipe理员没有find:/”当试图从Apache与ldap用户login。 我正在使用apache 2.4.18和新版本的ldap。 我跟随了互联网上可用的许多文档进行configuration设置。 apache2.conf : <Directory /var/www/html> AuthName "Test User Authentication" AuthType basic AllowOverRide None AuthBasicProvider ldap AuthLDAPURL "ldap://<ipaddress>/CN=admin,DC=test,DC=com?sAMAccountName?sub?(ObjectClass=*)" #AuthLDAPURL "ldap://localhost:389/dc=comcast,dc=com?sub?" #AuthLDAPBindDN "cn=admin,dc=test,dc=com" #AuthLDAPBindDN "cn=test,cn=myGroup,ou=testGroup,dc=test,dc=com" AuthLDAPBindDN "[email protected]" #AuthLDAPBindPassword "v0QDRz34sQPuT4b1Ox7YqAL8uQ05jARn" AuthLDAPBindPassword admin123 Require valid-user #require ldap-user admin test #LDAPVerifyServerCert off #AuthzLDAPAuthoritative off </Directory> ldap.conf : # # […]

ColdFusion 11 CFIDE更新后不会提供.cfm文件

我刚刚更新了一个CF服务器,通过CFpipe理员应用最新的修补程序,重新启动服务器,所有的网站备份,可爱。 但现在我无法进入CFIDE文件夹。 它被IPlocking在我的位置,我检查了neo-security.xml文件,并且已经被重置为10.*.*.*所以我删除了IP,重新启动了CF – 我似乎记得这样做会打开限制所以我可以在pipe理员里面重新添加IP 所有的网站都回来了,可爱的,仍然没有进入CFIDE文件夹,悲伤的时刻。 在我的apache conf中,直接在mod_jk.conf文件中,我把这行注释掉了,以至于我们托pipe的所有站点都无法访问CFIDE: #Alias /CFIDE "/PATH/TO/DEFAULT/SITE/CFIDE" 在我的默认站点,我有一个符号链接设置指向/ CFIDE到CFROOT/cfusion/wwwroot/cfide目录,我有一个Apache的conf文件设置为只允许从我的IP访问CFIDE文件夹 所以这一切都是由IP绑定的,CFIDE只能使用只在本地主机文件中设置的特定URL来访问。 这一切工作正常,直到我应用CF更新。 如果我访问example.com/CFIDE我得到一个403,这很好。 如果我访问example.com/CFIDE/administrator我得到一个404,这是不好的,它应该是服务于index.cfm文件。 如果我访问example.com/CFIDE/administrator/index.cfm我得到一个404,和上面一样。 如果我放入其他CFM文件的path,我也会得到同样的结果。 如果我在创build一个简单的Hello World文件后访问example.com/CFIDE/administrator/index.html ,则服务没有问题。 所以看来,更新到最新的CF修补程序已经停止.cfm文件,当我试图访问它们在浏览器中呈现。 任何人有什么想法,我可以从这里去?

如何压缩没有文件名的json响应

如果我检查我的网站,它告诉我,我需要压缩以下URL> https://distance2job.com/jm-ajax/get_listings/ 。 我目前有这个加载在我的apache2configuration。 ## mod_expires Caching ## # Cache Control via HTTP Headers + Expires # Generation of Expires and Cache-Control HTTP headers according to user-specified criteria # http://httpd.apache.org/docs/2.0/mod/mod_headers.html # ———————————————————————- # Expires Defaults <IfModule mod_expires.c> ExpiresActive On # Set default expires to 2 days ExpiresDefault A172800 ExpiresByType text/css A31536000 ExpiresByType application/x-javascript A31536000 ExpiresByType […]

ProxyPass用于子文件夹,不包括父文件夹

我有一个我使用的apache2: 从static文件夹中提供一些静态文件 代理在端口8870上运行的Web应用程序 现在,我想: 在需要/vocabulary时提供static/vocabulary/index.html的内容 请求/vocabulary/*时继续提供应用内容 我尝试使用排除设置两个规则! 规则,但它不工作。 我该怎么做? 这是我的configuration文件。 <VirtualHost *:80> ServerName example.com DocumentRoot "/static" <Directory /> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all Header set Access-Control-Allow-Origin "*" </Directory> # Proxy describe rules ProxyPass /home http://localhost:8870/home ProxyPassReverse /home http://localhost:8870/home ProxyPass /vocabulary http://localhost:8870/vocabulary ProxyPassReverse /vocabulary http://localhost:8870/vocabulary </VirtualHost>

Apache2上的PHPMyadminredirect问题

几天前,我在networking服务器上更新了Apache。 这似乎已经打破访问Phpmyadmin通过服务器IP: server.ip/phpmyadmin 现在,当在ip / phpmyadmin上方input时,它将redirect到服务器上托pipe的域。 domain.com/phpmyadmin 它明显地给出了一个404错误,因为/ var / html / www域指向没有Phpmyadmin目录/资源。 我已经尝试了以下,无济于事: sudo dpkg-reconfigure phpmyadmin 检查以下目录是否有任何对phpmyadminredirect的引用: /etc/apache2 /etc/phpmyadmin 有任何想法吗?

apachectl -f /etc/apache2/apache2.conf和apachectl start之间的区别

我正在运行Debian 8 Jessie,而且我的Apacheconfiguration有一个PHP问题 。 运行Apache: apachectl -f /etc/apache2/apache2.conf 在运行守护进程的传统方式时,提供所需的结果/行为不会: apachectl start 我该如何去确定这两个选项之间的差异以隔离我的问题?