我在apache / httpd上有一个web应用程序。 通过复制此应用程序并将其放在文档根目录下的不同目录中,我创build了该应用程序的一个新实例。 我也为每个实例build立了一个新的数据库。 我使用数据库领域来validation用户。 问题是,我使用MySQL来存储用户凭据,数据库信息存储在httpd.conf中,对所有实例都是全局的,像这样(没有密码): DBDriver mysql DBDParams "host=server_host port=3306 dbname=db_name user=user_name" DBDMin 4 DBDKeep 8 DBDMax 20 DBDExptime 300 我想为不同的实例使用不同的数据库名称,或者根据访问的应用程序的实例进行一些映射,以便将数据库用于身份validation。 是否有可能解决使用内置支持Apache2authentication? 如果不是,可以采用什么策略来解决这个问题?
我有一台运行Apache 2.2(充当负载均衡器)和2台机器(B&C)的networking上运行Windows 7上的Tomcat和Java Web应用程序。 有什么办法可以检查: 如果Web应用程序closures,但Tomcat仍在计算机B上运行,并将请求redirect到计算机C. 这是否与修改Tomcat或Apache 2.2configuration有关? 谢谢。
我已经安装了Apache,我想知道在Windows上安装FMS的正确方法,并能够运行FMS。 我已经安装了FMS,但是我无法启动它! 当我去Windows>程序>土坯> FMS>启动FMS它不启动服务(我没有看到我的屏幕右下angular的图标旁边的Apache服务器图标) 我怎样才能连接到pipe理控制台。 我有端口1935年打开,但仍然当我inputmysite.com:1935它不显示任何东西。 任何build议表示赞赏
我在.htaccess文件中得到了一些mod_rewrite的条件,但是我不认为它的写得很好(我对mod_rewrite还是比较新的) 有时候请求会以无限循环结束 而刚才我把SSL加到文件中.. 当请求https://我得到一个404错误The requested URL /_secure/_secure/ was not found on this server. 不知何故,它增加了一个额外的_secure的path? 的.htaccess # redirect non-active subdomain to 'www' RewriteCond %{HTTP_HOST} !^(admin|api|demo|files|secure|www)\.([^\.]+\.[^\.]+)$ [NC] RewriteRule ^(.*)$ http://www.domain.com [L,R=301] # put 'www' as subdomain if none is given RewriteCond %{HTTP_HOST} ^([^\.]+\.[^\.]+)$ [NC] RewriteRule ^(.*)$ http://www.%1/$1 [L,R=301] # redirect to subdomain RewriteCond %{HTTP_HOST} ^www\.([^\.]+\.[^\.]+)$ [NC] RewriteRule […]
我所有的外部连接都需要经过一个代理,所以对于我的用户,我已经添加了这条线让我可以自由地 在〜/ .bashrc export http_proxy=http://10.50.24.125:8080/ 上面的部分很好,但是对于我有的PHP脚本,我试图使用php_curl来获取文件,所以我也在那里定义了相同的代理: $curlHandle=curl_init(); curl_setopt($curlHandle, CURLOPT_URL, 'http://www.google.com'); curl_setopt($curlHandle, CURLOPT_HTTPPROXYTUNNEL, true); curl_setopt($curlHandle, CURLOPT_PROXYPORT, 8080); curl_setopt($curlHandle, CURLOPT_PROXY, '10.50.24.125'); $out=curl_exec($curlHandle); echo $out; curl_close($curlHandle); 但是,我没有看到任何结果,并且出于某种奇怪的原因,当我在运行脚本的netstat -n时,可以看到脚本尝试创build的连接,这是一个奇怪的部分: tcp 0 0 10.50.25.83:80 10.20.5.15:51194 TIME_WAIT 所以不是连接到10.50.24.125:8080,而是在一个随机的端口上连接到10.20.5.15,而本地的源端口是80? 有任何想法吗? 注意:运行CentOS 5.6
我正在尝试在我的apache2服务器上设置git-http-backend。 目前它正在使用suexec和一个包装和所有的东西,但没有限制。 我可以拉和推。 现在我想包括部分restrcit推送权限: <LocationMatch "^/git/.*/git-receive-pack$"> AuthType Basic AuthName "Git Access" AuthUserFile /var/www/vhosts/librepdm.alitecs.de/users Require user alexander </LocationMatch> 用户文件已到位并已填写。 这说我的Apache访问日志: 93.95.132.202 – – [28/Mar/2012:15:23:18 +0200] "GET /git/test.git/info/refs?service=git-receive-pack HTTP/1.1" 403 357 "-" "git/1.7.8.msysgit.0" 93.95.132.202 – – [28/Mar/2012:15:23:18 +0200] "GET /git/test.git/info/refs HTTP/1.1" 200 331 "-" "git/1.7.8.msysgit.0" 93.95.132.202 – – [28/Mar/2012:15:23:18 +0200] "GET /git/test.git/HEAD HTTP/1.1" 200 341 "-" "git/1.7.8.msysgit.0" […]
我在Ubuntu上运行Apache并使用基本的HTTP身份validation。 我有一个htpasswd文件,并有一个名为scott的用户名为tiger的密码。 不过,我将密码更改为tiger1 。 现在我可以使用tiger和tigerlogin。 即使我可以看到htpasswd文件中只有一行,并且在更改密码后encryption的密码已被更改。 有什么问题,我该如何处理?
我需要haproxy将product.company.comredirect到company.com/about/product acl newproduct hdr(host) –i product.company.com redirect location http://company.com/about/product if newproduct 我知道我打了服务器,但它永远不会redirect。 我试过hdr_beg(主机)产品,并没有工作。 我错过了什么?
Codeigniter重写查询string,如下所示: http://somedomain.com/index.php?q=something 成为: http://somedomain.com/index.php/q/something 我想在一个(非常)轻巧的网站上模仿这种行为,我正在开发一个婚礼RSVP系统。 我不想要臃肿的代码,也不需要它提供的任何东西。 我唯一想要的就是这个。 不幸的是,我不知道如何设置一个完成这个的mod-rewrite规则。 我可以设置一个规则来将/q/something翻译成?q=something ,但是我不能在没有改变用户正在查看的URL的情况下得到这样的规则。 我基本上是在寻找一些实际上是重写的“无声”版本。 也就是说,我想要重写q/something ?q=something ,但是将用户的URL保留在地址栏中作为q/something 。 提前致谢! 编辑 在该网站的.htaccess文件中,我有以下内容: RewriteEngine on RewriteRule ^/index.php/q/(.*) /index.php?q=$1 在网站的基本configuration(/etc/apache2/sites-available/mysite.conf)中,我有: <VirtualHost *> ServerAdmin [email protected] ServerName www.mysite.com DocumentRoot /var/www/www.mysite.com Options -Indexes +FollowSymLinks </VirtualHost> index.php文件当前只是打印出$_GET['q'] 。 现在,当我访问该网站http://www.mysite.com/index.php?q=12345 ,按预期显示“12345”。 但是,当我导航到http://www.mysite.com/index.php/q/12345 ,它不显示任何东西。 或者,相反,看起来查询string的值是空的。 我不太确定我做错了什么。
升级到Lion后,我的所有虚拟主机都停止工作。 他们redirect到“It works”主要的apache页面在我的设备上有一些奇怪的原因。 例: / etc / hosts: 127.0.0.1 myhost.com <VirtualHost *:80> DocumentRoot "/Library/WebServer/Documents/testproj/" ServerName myhost.com <Directory "/Library/WebServer/Documents/testproj/"> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory> ErrorLog "/private/var/log/apache2/testproj-error_log" CustomLog "/private/var/log/apache2/testproj-access_log" common </VirtualHost> 还有其他人面临同样的问题吗? 我怎样才能解决这个问题?