我正在构build一个基于OpenLayers的地图应用程序,它使用GeoServer来提供地图数据。 我遇到的问题是,除了通过WMS请求的地图图像外,我使用jQuery AJAX从GeoServer获取信息。 由于GeoServer运行在不同的端口,因为JavaScript中的跨站点脚本安全策略,我的请求被阻止。 作为Java应用程序, GeoServer在端口8080上运行在Apache上,而我的IIS实例在端口80上运行 。 我决定在IIS7中使用URL重写来解决这个问题,而不是build立一个代理。 我遵循这个指南 ,但它仍然不工作。 这是我的URL重写规则设置: 匹配url : (.*) 条件 : {HTTP_URL}匹配/geoserver 操作 :重写为http://localhost:8080/{R:1} ,附加查询string 当我请求http://localhost/geoserver/wms?QUERY_LAYERS=SanDiego:FWSA_sandiego&LAYERS=SanDiego:FWSA_sandiego&SERVICE=WMS&VERSION=1.1.1&FEATURE_COUNT=20&REQUEST=GetFeatureInfo&EXCEPTIONS=application/vnd.ogc.se_xml&BBOX=-13009123.590156,3862057.2905992,-13006066.109025,3865114.7717302&INFO_FORMAT=text/html&x=20&y=20&width=40&height=40&srs=EPSG:900913然而,我得到的只是一个404,尽pipe8080端口上的相同请求返回了正确的结果。 我究竟做错了什么? 提前致谢。
我已经在Windows 7机器上设置了XAMPP,并且我想限制对htdocs文件夹的访问,以仅限来自本地机器的请求。 C:\ Xampp \ htdocs是Web根文件夹。 我在我的apache / conf / httpd.conf文件中有以下内容: <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all </Directory> <Directory "C:/Xampp/htdocs"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All order deny,allow deny from all allow from 127.0.0.1 allow from localhost </Directory> 我所有的.htaccess文件都是空白的。 但是当我通过浏览器导航到Web根文件夹时,出现以下消息: 访问被禁止! 您无权访问请求的目录。 没有索引文件或目录是读保护的。 我尝试将IP限制添加到<Directory>…</Directory> ,但没有任何区别。 我在这里做错了什么?
似乎有一个pathinheritance问题,这让我难以理解访问限制。 例如,如果我授予rw访问一个组/用户,并希望将它限制为/../../secret为none,它会立即吐出我的脸。 这里是我试图在dav_svn.authz中实现的一个例子 [groups] grp_W = a, b, c, g grp_X = a, d, f, e grp_Y = a, e, [/] * = @grp_Y = rw [somerepo1:/projectPot] @grp_W = rw [somerepo2:/projectKettle] @grp_X = rw 预期: grp_Y可以访问所有的存储库,而grp_W和grp_X只能访问它们各自的存储库。 发生了什么: grp_Y可以访问所有的存储库,而grp_W和grp_X无权访问 如果我将访问顺序翻转到每个人都可访问的位置,并将其限制在每个存储库中,那么它将忽略无效规则(剥离权限),并为每个人提供在根级授予的访问权限。 放弃组,它执行相同的用户特定的条款; 甚至完全定义如: [/] a = rw b = c = d = e = f = […]
我正试图在windows 7机器上运行memcache,fast-cgi与apache 2.2 + php。 如果我不使用memcache一切正常。 在php.ini中禁用extension=php_memcache.dll的一切都恢复正常。 一旦我开始Apache,Apache日志说: [Wed Jan 12 18:19:23 2011] [notice] Apache/2.2.17 (Win32) mod_fcgid/2.3.6 configured — resuming normal operations [Wed Jan 12 18:19:23 2011] [notice] Server built: Oct 18 2010 01:58:12 [Wed Jan 12 18:19:23 2011] [notice] Parent: Created child process 412 [Wed Jan 12 18:19:23 2011] [notice] Child 412: Child process […]
这是我第一次安装Linux / Apache。 我在连接到局域网的机器上加载了CentOS和LAMPP。 关掉http和mysql(因为我不想和LLAMPP冲突) chkconfig httpd off chkconfig mysqld off 那么LAMPP就成功了 /opt/lampp/lampp start Starting XAMPP for Linux 1.7.3a… XAMPP: Starting Apache with SSL (and PHP5)… XAMPP: Starting MySQL… XAMPP: Starting ProFTPD… XAMPP for Linux started. 问题:无法连接 – Firefox无法在179.16.51.36build立与服务器的连接。 我需要一些指向下一步看什么。 在error_log文件中没有错误(只是一些警告) 我可以ping服务器。 httpd.conf看起来像这样: ServerRoot "/opt/lampp" Listen 80 ServerAdmin [email protected] ServerName 179.16.51.36 DocumentRoot "/opt/lampp/htdocs" <Directory /> […]
我编辑我的httpd.conf有以下几点 StartServers 2 MinSpareServers 2 MaxSpareServers 4 MaxClients 150 MaxRequestsPerChild 0 但是当我做一个 root@server [/usr/local/apache/conf]# ps aux | grep httpd | wc -l 我得到65-75个进程。 任何想法,为什么设置不生效? 我正在使用prefork,以防万一。
我想将www.example.com/fooredirect到www.example.com/bar/index.php/foo 所以我有规则(mod_rewrite) <Location /> RewriteEngine on RewriteRule /(.*) /bar/index.php/$1 [L] </Location> 这个configuration造成无限循环,如何解决? 谢谢。
我得到这个错误每秒在我的Apache错误日志,是什么原因造成的,如何解决? [debug] mod_headers.c(743):headers:ap_headers_output_filter()
我拥有一个运行几个网站的VPS。 我的一个网站需要使用Mavin for CometD,但是我仍然不得不让Apache运行其他网站。 为此,我正在使用HAProxy。 我把Apache移动到了80端口,并configurationHAProxy在那里运行。 HAProxy将适当的东西路由到Apache是一个很好的工作,但Apache给我“默认网站页面”,而不是适当的VirtualHost。 我怎样才能解决这个问题? 从我的Apacheconfiguration一点点: <VirtualHost 64.64.0.102:80> ServerName example.com ServerAlias www.example.com DocumentRoot /homeexample/public_html/hg ServerAdmin [email protected] <IfModule mod_userdir.c> Userdir disabled Userdir enabled isbwmp </IfModule> <IfModule mod_suphp.c> suPHP_UserGroup isbwmp isbwmp </IfModule> <IfModule !mod_disable_suexec.c> SuexecUserGroup isbwmp isbwmp </IfModule> CustomLog /usr/local/apache/domlogs/example.com-bytes_log "%{%s}t %I .\n%{%s}t %O ." CustomLog /usr/local/apache/domlogs/example.com combined ScriptAlias /cgi-bin/ /home/isbwmp/public_html/cgi-bin/ 还有一点从我的HAProxyconfiguration:(复制,我不明白,真的) frontend http_proxy […]
正如你可能知道zend框架使用.htaccessredirect的目的 所以当我试图按照这个build议: http : //techpp.com/2010/06/28/how-to-redirect-www-urls-to-non-www-urls-and-non-www-to-www / 结合必要的.htaccess代码为zend框架,redirect工作正常,但zend停止正常工作… 有没有人知道如何实现这个任务,而不会搞乱zend框架 目前的规则: RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ – [NC,L] RewriteRule ^.*$ index.php [NC,L]