apache - 如何在 apache httpd.conf 中添加注释而不是完整的行?

标签 apache comments httpd.conf

在 apache conf 文件中,如果一行以 # 开头,则该行被视为注释。例如,

#This is a comment line
#And then the following is some real settings:
AllowOverride None

但是,这是不允许的。

#And then the following is some real settings:
AllowOverride None #A comment that starts in the middle of line

是否可以在行的中间开始注释?如果是,怎么做?

最佳答案

documentation指出这是不可能的:

... Lines that begin with the hash character "#" are considered comments, and are ignored. Comments may not be included on the same line as a configuration directive ...

关于apache - 如何在 apache httpd.conf 中添加注释而不是完整的行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50084211/

相关文章:

redirect - 设置从http到https的apache重定向以获取特定的URL

Apache 代理 : No protocol handler was valid

apache - 山狮中的 httpd.conf

linux - 重定向到 Apache 中的目录

visual-studio-2010 - 将指向另一个文件 (Word) 的超链接插入到 Visual Studio 代码文件中

java - conf/web.xml 中的 Apache tomcat <error-page> 标记未呈现错误页面

jquery - 这在 jQuery 中合法吗?

javascript - 写入服务器上的 XML 文件

java - 使用 iText 和 PdfGraphics2D 的 PPTX 到 PDF 错误

docker - Apache 正在向图像添加 header ,导致图像损坏