假设我希望所有对example.com的请求都redirect到abc.com。 如何将所有内容redirect到abc.com的根目录并且不包含example.com中包含的任何path或参数? 例如 example.com/index.py?var=1 should go to abc.com 我在我的.htaccess中试过 RedirectPermanent / http://www.abc.com 但它是这样做的: example.com/index.py?var=1 goes to abc.com/index.py?var=1
我在httpd授权方面有问题。 当我连接到http:/ user1 popuplogin界面,user1,user2可以login并显示user1的数据。 我怎样才能创build一个规则,user1只能浏览user1文件夹,其他用户只能login到自己的文件夹? 谢谢 主文件夹/ home / user1 / home / user2中的用户列表 vi /etc/httpd/.htpasswd user1:$ apr1 $ NWoTku5D $ frFdpU6Y9eoZ4y1KZVGa60 user2:5D $ frFdpU6Y9eoZ4y1KZVGa60 $ apr1 $ NWoTku vi /etc/httpd/conf/httpd.conf AllowOverride AuthConfig AuthType basic AuthName "Media Zone" AuthUserFile /etc/httpd/.htpasswd Require valid-user
从控制台运行: ldapsearch -D cn=admin,dc=psikon,dc=net -LLL -W 我得到一个条目: dn: cn=megatron,ou=Executive,dc=psikon,dc=net sn: megatron objectClass: inetOrgPerson objectClass: top userPassword:: [password] cn: megatron 到现在为止还挺好? 所以一个虚拟主机有一个简单的configuration: AuthBasicProvider ldap AuthLDAPURL "ldapi:///?cn" AuthLDAPBindDN "cn=admin,dc=psikon,dc=net" AuthLDAPBindPassword "[admin passwd]" Require valid-user 当尝试login但是,Apache日志说: [Fri Nov 30 09:14:57 2012] [debug] mod_authnz_ldap.c(403): [client 173.246.22.18] [11233] auth_ldap authenticate: using URL ldapi:///?cn [Fri Nov 30 09:14:57 2012] [info] [client […]
这个问题应该被标记为closures 我最近在CentOS 6.3机器上编译MapServer 6.2 ,使用 ./configure –with-ogr=/usr/bin/gdal-config –with-gdal=/usr/bin/gdal-config –with-proj=/usr –with-geos=/usr/bin/geos-config –with-postgis=/usr/bin/pg_config –with-php=/usr/include/php –with-wfs –with-wfsclient –with-wmsclient –enable-debug –with-threads –with-wcs –with-sos –with-gd –with-freetype=/usr/bin –with-jpeg –with-cairo –with-curl 如果这是有利的话,无论如何。 所以在那之后,Apache / 2.2.15默默无法重启,也就是说,当apachectl graceful ,它说“httpd没有运行,试图启动”。 在Apache error_log, /var/log/messages 没有什么值得关注的东西,它很奇怪,因为到目前为止它一直工作。 重新启动机器多次没有解决问题。 我做了一些其他的事情: [root@R12X0210 cgi-bin]# service httpd status httpd is stopped [root@R12X0210 cgi-bin]# ps aux|grep httpd root 1846 0.0 0.0 103236 864 […]
我正在尝试使用Httpd,mod_cluster和Tomcat来设置负载平衡器。 我的Httpd在运行tomcat的IP 192.168.9.73的服务器上运行。 这是我的Httpdconfiguration – Listen *:9999 <VirtualHost *:9999> ManagerBalancerName cluster <Directory /> Order deny,allow Deny from none Allow from all </Directory> ProxyPass / balancer://cluster/ stickysession=JSESSIONID|jsessionid nofailover=On ProxyPassReverse / balancer://cluster/ KeepAliveTimeout 300 MaxKeepAliveRequests 0 ServerAdvertise On AdvertiseGroup 224.0.1.105:23364 AdvertiseFrequency 5 <Location /mod_cluster_paas> SetHandler mod_cluster-manager Order deny,allow Deny from none Allow from all </Location> </VirtualHost> 和Tomcat […]
我对Linux比较陌生。 我selectCentOS 6.4安装在我们将用作组织内的Web服务器(不会从外部看见)的PC上。 我已经select安装“Web服务器”configuration文件,并确保安装了Apache,MySQL和PHP的所有function,并保证了MySQL的安全。 我把服务器连接到networking,我可以从我的工作站上ping它。 我可以从服务器上ping我的工作站。 我可以从服务器ping Google。 当我做/etc/init.d/httpd状态它说httpd正在运行。 同样的MySQL。 当我做/etc/init.d/httpd停止它停止它,当我然后做/etc/init.d/httpd启动,它说[失败]没有解释为什么。 我已经安装了WebMin,并且可以通过服务器上的本地主机来访问它,但是我无法通过任何工作站的IP地址或域名访问它。 我也可以不访问存储在/ var / www / html中的index.html。 我暂时closures防火墙进行testing。 你可以请告诉我还能做些什么来解决这个问题? 谢谢! 下面是如果需要缩短httpd.conf(注释,AddLanguage和AddIcon删除)。 谢谢! ========== ServerTokens OS ServerRoot "/etc/httpd" PidFile run/httpd.pid Timeout 60 KeepAlive Off MaxKeepAliveRequests 100 KeepAliveTimeout 15 <IfModule prefork.c> StartServers 8 MinSpareServers 5 MaxSpareServers 20 ServerLimit 256 MaxClients 256 MaxRequestsPerChild 4000 </IfModule> <IfModule worker.c> […]
我目前正在build立一个Icinga监控系统,但是我缺乏如何访问特定页面的想法,通过http访问,主要是Icinga上的“所有问题”选项。 有反正我可以绕过authentication(ideia是把这个页面上的旋转页面上显示我的第二个屏幕)? 提前致谢
我们有SVN通过Apache httpd运行。 对于身份validation,我们使用Active Directory,如果用户不在AD中,我们将回退到文件身份validation。 这工作正常,除了在文件身份validation的情况下的错误信息。 我们一遍又一遍的错误信息: auth_ldap authenticate: user <user> authentication failed; URI /svn/some/uri [User not found][No such object] 我们想过滤掉这些消息,因为我们的日志文件由于这个不必要的日志消息而迅速增长。
我试图重新启动Apache 2.2.14(在Ubuntu 10.04上也使用PHP 5.3.2,以root身份运行所有命令)。 它关机,但不会启动。 这是一个全新的VPS,没有防火墙或IP表。 当我运行apache2ctl start ,我得到这个回应: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs apache2ctl status产生这个: Looking up localhost Making HTTP connection to localhost Alert!: Unable to connect to remote host. lynx: Can't access startfile http://localhost/server-status 'www-browser -dump http://localhost:80/server-status' […]
我有一个运行apache2,php和MySQL的centos 6服务器。 Apacheconfiguration有几个虚拟站点,因为服务器运行六个网站,六个站点中的三个使用MySQL,另外三个不使用。 最近我发现,使用MySQL崩溃的网站 – 报告错误“无法连接到SQL数据库..” 查看日志后,看起来有多个Apache运行的实例吃掉了我所有的内存 – 这导致服务器为了阻止服务器死亡而终止MySQL进程,并且不久之后它将恢复(偶尔我必须修复一些表格) 为了试图控制这种情况,我把max_connections降到了100,但是这并没有帮助 现在我不知道,如果我需要更多的内存(安装1GB),或者如果我被拒绝服务攻击。 诚实地说,我们确实希望服务器有大量的stream量,但是我怎么知道一个IP是否连续打到这个盒子? 如果有帮助,我在下面的“正常操作”中粘贴了一些输出 free -m total used free shared buffers cached Mem: 992 771 221 0 15 87 -/+ buffers/cache: 668 323 Swap: 976 39 937 ps aux | grep apache apache 17148 0.1 3.4 430836 35036 ? S 06:34 0:10 /usr/sbin/httpd apache 17150 0.1 […]