问题标签 [apache-config]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
apache - 如果其他类型重写条件和重写规则,是否可以使用 htaccess?
我正在尝试编写一个基本上执行此操作的 htaccess 文件:
这可以使用htaccess吗?
apache - apache: cgi links lead to a "you have chosen to open foo.cgi", although scriptalias is set
Following this guide on CentOS 5.2, just getting nagios set up for the first time. The main page shows up just fine, but when I try to view any of the pages that should be generated by a cgi process, firefox prompts me to save the .cgi instead, so apache's obviously not understanding that it needs to run the cgi and get back some html from it.
The odd thing is, though, that, as far as I can tell, apache should be running these files as cgi. nagios.conf:
Either the ScriptAlias directive or ExecCGI option should be triggering this, but neither of them seems to have any effect.
This config file is being parsed by apache, because if I move it out of conf.d, /nagios gives a 404.
The .cgi files are indeed in the /nagios/cgi-bin/ directory, so I didn't specify the incorrect directory.
Searching seemed to only provide people who had difficulty with permissions, which is not the issue here. This seems to me to be a pretty basic thing, but even with the excellent apache documentation, I'm at a bit of a loss (been using cherokee too much lately :) ).
django - 如何将一个目录别名为我的文件系统,并将其子目录别名为 Apache 中的 WSGI 文件?
我使用 nginx 作为 apache/mod_wsgi 和 Django 的反向代理。目前,使用 / 别名我的 wsgi 文件和 /media 别名我的媒体目录一切正常。但是,我想设置它,以便 /media/foo/bar也为我的 wsgi 文件加上别名,这样 /media/foo/example.txt 将使用 apache 提供 example.txt,但 /media/foo/bar/example.txt将传递给我在 Django 中的 urls.py。
我尝试将另一个 WSGIScriptAlias 添加到我的 /media/ 别名上方的 apache.conf 中,但 /media/foo/bar/example.txt 仍然由 apache 提供服务。我的 apache.conf 目前看起来像这样:
php - 在 Windows 7 下 PHPIniDir 坏了?
我有一台运行在 Windows XP 机器上的服务器,它使用 Apache2 和 PHP 和 MySQL。我最近升级到 Windows 7,但无法让它正常工作。Apache 工作正常,PHP 工作正常,但我似乎无法让它与php.ini
文件一起工作。
当我设置PHPIniDir
到带有php.ini
文件的目录时,Apache 服务不会启动。
当我设置PHPIniDir
为没有php.ini
文件的目录时,Apache 服务确实启动了。
当我离开时PHPIniDir
,Apache 服务不会启动。
有没有人找到解决这个问题的方法?谢谢!
编辑 :
PHPIniDir "C:\Windows"
#works(无php.ini
文件)
PHPIniDir "C:\Program Files (x86)\php\"
#不起作用(包含php.ini
文件)
我在任何给定时间最多启用一个。
php - 显示其他服务器的图像和浏览器上的路径显示应该是我的服务器
我想显示来自其他站点的一些图像,但我想要我自己的服务器 url 而不是存储在我的末尾。
在我这样写的代码中
但在鲍泽源显示为
svn - 颠覆 (SVN) Propfind 405 错误
我是 Subversion 的新手,有人告诉我这是自切片面包以来最好的事情。我已经尝试过 Google,但我只是对错误的地方空白,并尝试了多种不同的建议。我收到以下错误。
位置信息指定不正确。
svn: Propfind of '/svn': 405 Method not allowed ( http://IPADDRESS ) IPADDRESS 是我服务器的 IP。
当我尝试通过 Zend Studio 登录时,我得到了这个。我使用以下内容尝试登录:
网址:http://IPADDRESS/svn/
用户名:fakeuser
密码:fakepassword
我相信问题出在这个文件上,因为错误“位置信息指定不正确”。该文件包含在 httpd.conf 文件中。我已经重新启动了 Apache,并且重新启动 Apache 时没有错误。
我花了几个小时在这上面,但无法得到它。
我没有使用代理服务器。我正在使用服务器的 IP 地址,因为我在服务器上有多个域并且认为这可能是一个问题。
macos - “/etc/apache2/sites-available”的 mac 等价物是什么?
我正在从源代码安装 Koha。通用 unix 方向指示 sudo make install 之后的以下步骤
嗯?
我的 apache2 目录不包含可用站点,只有 /private/etc/apache2/extra /private/etc/apache2/httpd.conf /private/etc/apache2/magic /private/etc/apache2/mime.types /private/etc /apache2/original /private/etc/apache2/other /private/etc/apache2/users
我应该能够浏览到http://servername:8080/
运行 Koha,我在 koha-httpd.conf 中指定了“服务器名称”,如下所示:
但是,当我去时http://john-breedloves-mac-mini.local:8080/
,我得到:
有用!
这就像讽刺或什么的。
帮助一个菜鸟。
php - 是否可以在没有扩展名的情况下在 apache 中运行 php 文件?
我有一个文件
我希望能够通过转到
但我还是需要
打开文件
如果,实际上,目录是一个目录。
这是使用 Red Hat 和 Apache 的典型 LAMP 设置。
那可能吗?如果是这样,怎么做?
python - (django 初始设置) Django 安装将所有流量重定向到 django 页面,修复?
我是 Django 的新手。我一直试图让它在我的 Ubuntu 服务器上运行。
每次有人我的服务器时,它都会重定向到“恭喜你的第一个 Django 驱动的页面”。它完全忽略了 www 目录中的 index.html 文件。这是为什么?有没有办法让它只在我转到子域 /testproject 时才转到 django 页面?
这是我得到的
python 版本:2.5.2 Django 版本 1.2 b1
我正在使用 mod_python。这是我的 apache http.conf 文件
谢谢!
apache - 带有子域和 url 模式的 mod_rewrite
我想将子域用作带有 mod_rewrite 的 get 变量并使用一些参数:
例如/page/language/site/counter
->index.php?o=operator&lg=language&s=arg1&c=arg2
如何用 mod_rewrite 做到这一点?
任何想法?
提前致谢