根据说明,我已经configuration了多个LDAP源以实现冗余。 我发现configuration有一些问题。 如果ldap服务不在指定的ldap服务器上工作,而不是转到列表中的下一个服务器,那么工作不会通过列表中的其他条目进行。 如果ldap服务器closures而不能正常工作,则会引发5xx内部服务器错误,而不会通过列表中的其他条目进行处理。 这些Apache的错误,或者我应该包括更多的指令来正确configuration冗余? 有问题的http.conf部分: <AuthnProviderAlias ldap ldap1> AuthBasicProvider ldap AuthLDAPURL "ldap://ldap1.server.com:389/dc=server,dc=com?sAMAccountName?sub?(objectClass=*)" AuthLDAPBindDN "CN=matcher,OU=Application Accounts,dc=server,dc=com" AuthLDAPBindPassword "SECRET" </AuthnProviderAlias> <AuthnProviderAlias ldap ldap2> AuthBasicProvider ldap AuthLDAPURL "ldap://ldap2.server.com:389/dc=server,dc=com?sAMAccountName?sub?(objectClass=*)" AuthLDAPBindDN "CN=matcher,OU=Application Accounts,dc=server,dc=com" AuthLDAPBindPassword "SECRET" </AuthnProviderAlias> <AuthnProviderAlias ldap ldap3> AuthBasicProvider ldap AuthLDAPURL "ldap://ldap3.server.com:389/dc=server,dc=com?sAMAccountName?sub?(objectClass=*)" AuthLDAPBindDN "CN=matcher,OU=Application Accounts,dc=server,dc=com" AuthLDAPBindPassword "SECRET" </AuthnProviderAlias> <AuthnProviderAlias file file1> AuthUserFile /etc/mdpctest/htpasswd.users </AuthnProviderAlias> <Directory /srv/www/htdocs/mdptest> Order deny,allow […]
我是configurationApache的新手。 我有两个需要在本地运行的应用程序,它们运行在不同的服务器上 – 一个在jboss上,另一个在Jetty上。 现在他们都使用相同的Apache服务器来提供静态文件。 我用jboss和jetty服务器解决了http端口(8080)和ajp端口(8009)的问题。 这两个服务器启动时没有端口冲突。 接下来是Apache的configuration部分。 httpd.conf具有server1(jboss上的app1)的定义,所以我添加了对vhosts文件的引用,并将其放入server2(jetty上的app2)的configuration中。 问题是如果我有vhosts文件的引用,app2工作正常,但app1永远不会被Apache解决 – “在此服务器上找不到请求的URL / us / en_us” 起初我想也许我应该把这两个服务器的定义在虚拟主机文件,所以我做了。 把服务器1的定义放在server2下面,但是 – app1仍然没有加载,而app2像以前一样加载。 对app1的请求显示了app2的访问日志。 然后在vhosts文件中,我交换了定义,即将server1的定义放在server2之上,现在这两个应用程序都没有在浏览器中加载。 我希望我在这里不太困惑。 只有server1的定义(无虚拟主机)的App1的作品。 在添加server2的定义(在虚拟主机),app1停止工作,但app2的确工作。 此外,哪个服务器的定义高于另一个在虚拟主机文件截获到两个应用程序的请求。 NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "C:/env/local/cust/httpd/docs/dummy-host.com" ServerName dummy-host.com ServerAlias www.dummy-host.com ErrorLog "logs/dummy-host.com-error.log" CustomLog "logs/dummy-host.com-access.log" common </VirtualHost> <VirtualHost app2.local.com:80> ServerAdmin [email protected] DocumentRoot "C:/app2" ServerName app2.local.com ErrorLog "logs/store-error.log" CustomLog […]
301正在redirect,但它将旧url附加到新url的末尾,如下所示: http://www.example.co.uk/new-dir/new-page/?/old-dir/old-page/ 这是我的.htaccess RewriteEngine On RewriteCond %{HTTP_HOST} ^example\.co.uk [NC] RewriteRule ^(.*)$ http://www.example.co.uk/$1 [R=301,L] Redirect 301 /old-dir/old-page/ http://www.example.co.uk/new-dir/new-page/ RewriteCond $1 !\.(gif|jpe?g|png)$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php?/$1 [L]
我的apache2正在使用缓慢运行。 一个PHP文件需要很长的时间来处理。 服务器是活的。 我不想重新启动它。 所以我认为我strace它并检查发生了什么。 所以我跑了 strace -p `cat /var/run/apache2.pid ` 之后,我加载了一些testingurl。 加载多次。 但是我没有在strace控制台上看到任何输出! 然后我记得有很多subprocess。 所以我检查了他们 $ ps ax | grep apache[2] -i 1877 ? Ss 0:02 /usr/sbin/apache2 -k start 2006 ? S 0:00 /usr/sbin/apache2 -k start 2007 ? S 0:00 /usr/sbin/apache2 -k start 2008 ? S 0:00 /usr/sbin/apache2 -k start 2009 ? S 0:00 […]
我有一个CentOS服务器机器,我按照这篇文章安装了vsftpd服务器: http : //www.cyberciti.biz/tips/centos-redhat-vsftpd-ftp-with-virtual-users.html 我创build了一个虚拟用户,但在vsftpd.conf中,我做了以下操作: local_root=/var/www/html 并且在chown -R ftp:ftp /var/www/html根目录chown -R ftp:ftp /var/www/html ,权限是这样的: drwxrwsr-x 4 ftp ftp 4096 Feb 22 17:28 . drwxr-xr-x 10 root root 4096 Oct 21 00:05 .. drwxr-sr-x 2 root ftp 4096 Feb 22 17:28 fromconsole -rwxrwsr-x 1 ftp ftp 30 Feb 19 20:02 index.html drwxrwsr-x 3 ftp ftp 4096 […]
因此,我在abc.com服务器上创build了一个反向代理,其中xyz.com/users/sign_in将代理“/ users / sign_in”,以便在url中显示abc.com/users/sign_in。 这在ubuntu和apache2中运行良好。 在ubuntu启用代理后,我设置我的虚拟主机是这样的: <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName abc.com ServerAlias www.abc.com DocumentRoot /var/www/vhosts/abc.com/public_html <Directory /var/www/vhosts/abc.com/public_html/> Options FollowSymLinks MultiViews AllowOverride All </Directory> ProxyRequests Off <Proxy *> Order deny,allow Deny from all Allow from all </Proxy> ProxyPass /users/sign_in http://xyz.com/users/sign_in ProxyPassReverse /users/sign_in http://xyz.com/users/sign_in ErrorLog /var/log/apache2/abc.com-error.log LogLevel warn CustomLog /var/log/apache2/abc.com-access.log combined </VirtualHost> 现在是这个问题。 / users / […]
也许这是一个愚蠢的问题,但由于我不是一个系统pipe理员,我无法find解决这个问题: 我做了CentOS 6.2(64位)的全新安装,之后我没有更改任何configuration,我启动了Apache(以root身份) /etc/init.d/httpd start 如果我导航到localhost我从我的服务器得到一个正确的响应,但如果我尝试浏览我的networkingIP(172.16.8.59),我得到一个错误: (113) No route to host 我谷歌错误,一切都指向了鱿鱼configuration据我所知,但不知道,因为我甚至没有安装鱿鱼服务。 提前致谢!
我想重写所有.mp3文件到一个php文件。 而我不想传递的path 所以http://localhost/somepath/feb.mp3 http://localhost/feb.mp3 应该没有什么区别。 我想出了: RewriteRule ^(.*)\.mp3$ /files/read/?file=$1.mp3 [QSA] 我错过了什么? 也许一些正则expression式(。*)之前,但为什么不拿起MP3模式,并redirect到/files/read/?file=feb.mp3? 这似乎甚至没有赶上MP3文件: applying pattern '^(.*)\.mp3$' to uri 'feb.mp3' 它并没有停在那里,它经历了另一个条件, applying pattern '^.*$' to uri 'feb.mp3' pass through /htdocs/project/project-web/feb.mp3 非常感谢,如果这可以解决。 这是我的完整.htaccess SetEnv APPLICATION_ENV开发 RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ – [NC,L] RewriteRule ^(.*)\.mp3$ files/read/?file=$1.mp3 [QSA] RewriteRule […]
我有一套重写,应该赶上/cache/images/*文件系统不存在的/cache/images/*任何请求,并返回一个通用的图像根据后缀(相应的* _1.jpg的请求像/cache/images/foo_1.jpg这样的资源不存在)。 下面的代码块适用于大多数情况,但也匹配以1.jpg , 2.jpg或3.jpg结尾的所有请求,例如“domain.com/1.jpg”也返回/images/generic_1.jpg通用图像。 RewriteCond %{REQUEST_FILENAME} -f RewriteRule . – [L] RewriteCond %{REQUEST_URI} ^/cache/images/.*$ [NC] RewriteRule .*1.jpg /images/generic_1.jpg [L] RewriteRule .*2.jpg /images/generic_2.jpg [L] RewriteRule .*3.jpg /images/generic_3.jpg [L] 如果我复制第二个RewriteCond在2.jpg和3.jpg RewriteRule ,它按照devise工作,但是我想正确地执行这个操作,并将RewriteCond应用到它下面的三个RewriteRule 。 我究竟做错了什么?
当我尝试从src rpm(Apache 2.4.1)构buildrpm时,出现这个错误: rpmbuild -tb httpd-2.4.1.tar.bz2 –ba httpd.spec + ./configure –build=x86_64-redhat-linux-gnu –host=x86_64-redhat-linux-gnu –target=noarch-redhat-linux-gnu –program-prefix= –prefix=/usr –exec-prefix=/usr –bindir=/usr/bin –sbindir=/usr/sbin –sysconfdir=/etc –datadir=/usr/share –includedir=/usr/include –libdir=/usr/lib64 –libexecdir=/usr/libexec –localstatedir=/var –sharedstatedir=/usr/com –mandir=/usr/share/man –infodir=/usr/share/info –enable-layout=RPM –libdir=/usr/lib64 –sysconfdir=/etc/httpd/conf –includedir=/usr/include/httpd –libexecdir=/usr/lib64/httpd/modules –datadir=/var/www –with-installbuilddir=/usr/lib64/httpd/build –enable-mpms-shared=all –with-apr=/usr –with-apr-util=/usr –enable-suexec –with-suexec –with-suexec-caller=apache –with-suexec-docroot=/var/www –with-suexec-logfile=/var/log/httpd/suexec.log –with-suexec-bin=/usr/sbin/suexec –with-suexec-uidmin=500 –with-suexec-gidmin=100 –enable-pie –with-pcre –enable-mods-shared=all –enable-ssl –with-ssl –enable-socache-dc –enable-bucketeer –enable-case-filter –enable-case-filter-in –disable-imagemap […]